agnieszka naplocha - breaking the norm with creative css - codemotion milan 2017

105
CSS breaking the norm with creative by @aganaplocha

Upload: codemotion

Post on 21-Jan-2018

90 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSSbreaking the norm with creative

by @aganaplocha

Page 2: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSSbreaking the norm with creative

by @aganaplocha

Page 3: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSSbreaking the norm with creative

by @aganaplocha

Page 4: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSSbreaking the norm with creative

by @aganaplocha

Page 5: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSSbreaking the norm with creative

by @aganaplocha

Page 6: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

create a website

by @aganaplocha

Page 7: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

create a website

by @aganaplocha

Page 8: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

create a website

by @aganaplocha

Page 9: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

create a website

by @aganaplocha

Page 10: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 11: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 12: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 13: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 14: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 15: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 16: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 17: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 18: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

12-columns grid

by @aganaplocha

Page 19: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

3 boxes

by @aganaplocha

Page 20: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

?by @aganaplocha

Page 21: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

??????by @aganaplocha

Page 22: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 23: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

onlineby @aganaplocha

Page 24: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

offlineby @aganaplocha

Page 25: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 26: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

offlineby @aganaplocha

Page 27: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 28: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 29: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

you’re awesomedear print

by @aganaplocha

Page 30: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 31: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 32: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 33: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 34: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 35: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

where isCSS?by @aganaplocha

Page 36: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

where isCSS?by @aganaplocha

Page 37: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 38: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

the CSSchallengeby @aganaplocha

Page 39: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSS grid is here!by @aganaplocha

Page 40: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

https://www.mozilla.org/en-US/developer/css-grid/

Page 41: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 42: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

clipping clip-path

by @aganaplocha

Page 43: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

Page 44: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

clip-path: inset(100px 50px); clip-path: circle(50px at 0 100px); clip-path: polygon(50% 0%, 100% 50%, 50% 100%); clip-path: url("#water");

CSS

Page 45: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

clip-path: inset(100px 50px); clip-path: circle(50px at 0 100px); clip-path: polygon(50% 0%, 100% 50%, 50% 100%); clip-path: url("#water");

CSS

Page 46: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

Page 47: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

Page 48: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

-webkit-clip-path: url("#water"); clip-path: url("#water");

<svg> <defs> <clipPath id="water"> <path d="M468.2,226.8c-1.8-..." /> </clipPath> </defs> </svg>

HTML

CSS

Page 49: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 50: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

clip-path no

w also suppo

rts basic sh

apes

Page 51: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

clipping cut out image

by @aganaplocha

Page 52: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

Page 53: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

.svg .jpg

Page 54: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

-webkit-clip-path: url("#clip-plant"); clip-path: url("#clip-plant");

<svg> <defs> <clipPath id="clip-plant"> <path d="M468.2,226.8c-1.8-..." /> </clipPath> </defs> </svg>

HTML

CSS

Page 55: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

wait, but why?

by @aganaplocha

Page 56: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

.jpg .png

123 kB 819 kB by @aganaplocha

Page 57: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

.jpg .png

123 kB 819 kB x6by @aganaplocha

Page 58: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

.jpg .png

123 kB 819 kB x6by @aganaplocha

Page 59: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

.jpg .png

123 kB 819 kB x6by @aganaplocha

Page 60: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

https://css-tricks.com/transparent-jpg-svg/

Page 61: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 62: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

masking by @aganaplocha

Page 63: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSS

by @aganaplocha

mask: url(’mask.png’); mask-image: url(’mask.png’) linear- gradient(-45deg,rgba(0,0,0,1) 20%, rgba(0,0,0,0) 50%); mask-image: url(#masking);

Page 64: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

mask: url(’mask.png’); mask-image: url(’mask.png’) linear- gradient(-45deg,rgba(0,0,0,1) 20%, rgba(0,0,0,0) 50%); mask-image: url(#masking);

CSS

by @aganaplocha

FF and IE support only this one

Page 65: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CSS

by @aganaplocha

-webkit-mask-image: url(image.png); mask-image: url(image.png);

remember abo

ut vendor pr

efixes

Page 66: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

mask-image: url(image.png); -webkit-mask-image: url(image.png); -webkit-mask-repeat: no-repeat; -webkit-mask-size: 300px;

CSS

by @aganaplocha

just like for background

Page 67: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

transparency

Page 68: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

transparency

Page 69: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 70: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

clipping masking vs

by @aganaplocha

Page 71: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

vectors clipping masking

by @aganaplocha

images

Page 72: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

vectors clipping masking

by @aganaplocha

images

Page 73: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

vectors clipping masking

by @aganaplocha

images

Page 74: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

shape outside

by @aganaplocha

Page 75: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

shape-outside: circle(50%);CSS

by @aganaplocha

Page 76: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

shape-outside: circle(50%);CSS

you can go with the circle(), polygon(), inset(), ellipse(), but another possible value is the url() function.

by @aganaplocha

Page 77: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 78: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 79: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

float: ... ; height/width: ... ; background: ... ; mask-image: ... ; shape-outside: ... ;

CSS

by @aganaplocha

Page 80: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Received an invalid response. Origin 'null' is therefore not allowed access.

by @aganaplocha

Page 81: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CORS by @aganaplocha

eeeoooeeeooo

Page 82: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CORS by @aganaplocha

#emergency

Page 83: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

CORS by @aganaplocha

#emergencyCross-Origin Resource Sharing

Page 84: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 85: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

SVG is sooo coolby @aganaplocha

Page 86: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplochaby @aganaplocha

Page 87: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

<path id="wave" d="M0,33.3c38,0,38,34,76.1,34c38,0,38-34,76.1-34c38,0,38,34,76.1,34"/> <text> <textPath xlink:href="#wave"startOffset="0%"> <tspan>don’t be afraid of checking out cool things</tspan>

</textPath> </text>

SVG CODE

by @aganaplocha

Page 88: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 89: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

chaos you’re welcome

by @aganaplocha

Page 90: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 91: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

/prettyuglyproject

Page 92: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 93: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Page 94: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

let’s make Web more crazy!zzzzzzzzzz

by @aganaplocha

Page 95: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

let’s make Web more crazy!zzzzzzzzzz

by @aganaplocha

Page 96: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

Henri Matisse

„„Creativity takes courage

Page 97: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

create a website

by @aganaplocha

Page 98: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

caniuse.com

Page 99: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

caniuse.com

Page 100: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

by @aganaplocha

Henri Matisse

„„Creativity takes courage

Page 101: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

ssstickers! post cardsss!

CONTEST!

@aganaplocha @CodemotionIT

Page 102: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

kahoot.it

CONTEST!

@aganaplocha @CodemotionIT

Page 103: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

709792

CONTEST!

@aganaplocha @CodemotionIT

Page 104: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

thank you! @aganaplocha

Page 105: Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017

let’s break the norm @aganaplocha