What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides: What’s New In CSS?...

24
Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Transcript of What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides: What’s New In CSS?...

Page 1: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

What’s New In CSS?Rachel Andrew, CSS WG member on behalf of Fronteers.

Page 2: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Page 3: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Page 4: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

https://www.w3.org/TR/css-transforms-1/ https://www.w3.org/TR/css-values-3/ https://www.w3.org/TR/css-scroll-snap-1/ https://www.w3.org/TR/css-break-3/ https://www.w3.org/TR/css-flexbox-1/ https://www.w3.org/TR/css-contain-1/ https://www.w3.org/TR/selectors-3/

Notable Publications since TPAC

Page 5: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Lots of new things for the web platform

Page 6: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

CSS Grid Level 2 - subgridhttps://www.w3.org/TR/css-grid-2/

Page 7: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

.subitem {grid-column: 3 / 6;grid-row: 1 / 3;

}

.grid {display: grid;grid-template-columns: repeat(9, 1fr);grid-template-rows: repeat(4, minmax(100px, auto));

}

.item {grid-column: 2 / 7;grid-row: 2 / 4;display: grid;grid-template-columns: subgrid;grid-template-rows: subgrid;

}

Page 8: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Page 9: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Conic Gradientshttps://www.w3.org/TR/css-images-4/#conic-gradients

Page 10: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

.cone {

width: 200px;

height: 200px;

background: conic-gradient(orange, green, orange);

border-radius: 50%;

margin: 20px;

}

Page 11: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

.chart {

width: 200px;

height: 200px;

background:

conic-gradient(red 35%, green 35%, green 65%, orange 65%,

orange 90%, yellow 90%);

border-radius: 50%;

margin: 20px;

}

Page 12: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

.pacman {

width: 200px;

height: 200px;

background:

conic-gradient(yellow 0%, yellow 15%, white 15%, white 35%,

yellow 35%);

border-radius: 50%;

margin: 20px;

}

Page 13: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

CSS Scrollbarshttps://www.w3.org/TR/css-scrollbars-1/

Page 14: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

.list {

height: 400px;

width: 250px;

overflow-y: scroll;

scrollbar-width: thin;

scrollbar-color: rebeccapurple hotpink;

}

Page 15: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Page 16: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

CSS Scroll Snaphttps://www.w3.org/TR/css-scroll-snap-1/

Page 17: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

body {

display: flex;

overflow-x: scroll;

scroll-snap-type: x mandatory;

}

img {

width: 31vw;

height: 300px;

margin: 0 3.5vw 0 0;

object-fit: cover;

scroll-snap-align: start;

}

Page 18: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Page 19: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

.list {

height: 400px;

width: 250px;

overflow-y: scroll;

scroll-snap-type: y mandatory;

}

.list li {

scroll-snap-align: start;

}

Page 20: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Page 21: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

CSS Containmenthttps://www.w3.org/TR/css-contain-1/

Page 22: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

.box {

contain: strict;

}

Page 23: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Example by Manuel Rego Casasnovas: https://blogs.igalia.com/mrego/2019/01/11/an-introduction-to-css-containment/

Page 24: What’s New In CSS? · 2019. 4. 7. · Rachel Andrew, Fronteers. Slides:  What’s New In CSS? Rachel Andrew, CSS WG member on behalf of Fronteers.

Rachel Andrew, Fronteers. Slides: https://noti.st/rachelandrew

Thank you!https://noti.st/rachelandrew/Kr6L2U/whats-new-in-css