The Near Future of CSS
Rachel Andrew
Rachel Andrew
» https://rachelandrew.co.uk
» https://grabaperch.com
» @rachelandrew
» Invited Expert to the CSS Working Group
» Google Developer Expert
Box Alignment Level 3
This is the vertical centering
module!
Centre the content of .box
.box {
display: flex;
align-items: center;
justify-content: center;
}
<div class="box">
<img alt="balloon" src="square-balloon.jpg">
</div>
http://codepen.io/rachelandrew/pen/XKaZWm
The Near Future of CSS
CSS Box Alignment Level 3
"The box alignment properties in CSS are a set of 6 properties that
control alignment of boxes within other boxes."
-- https://drafts.csswg.org/css-align/
CSS Box Alignment Level 3
Defines:
» justify-content
» align-content
» justify-self
» align-self
» justify-items
» align-items
The Near Future of CSS
.wrapper {
display: flex;
}
.wrapper li {
min-width: 1%;
flex: 1 0 25%;
}
.wrapper li:nth-child(2) {
align-self: center;
}
.wrapper li:nth-child(3) {
align-self: flex-start;
}
.wrapper li:nth-child(4) {
align-self: flex-end;
}
http://codepen.io/rachelandrew/pen/RavbmN
The Box Alignment spec defines
how these properties work in other
layout methods
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.wrapper li {
min-width: 1%;
}
.wrapper li:nth-child(2) {
align-self: center;
}
.wrapper li:nth-child(3) {
align-self: start;
}
.wrapper li:nth-child(4) {
align-self: end;
}
http://codepen.io/rachelandrew/pen/jqdNoL
CSS Grid Layout
"Unlike Flexbox, however, which is single-axis–oriented, Grid Layout is
optimized for 2-dimensional layouts: those in which alignment of
content is desired in both dimensions."
-- https://drafts.csswg.org/css-grid/
Defining a simple grid
.cards {
display:grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 10px;
}
The fr unit
Defines a fraction unit - a fraction of the available space.
Works in a similar way to using flex-grow with a positive value.
The Near Future of CSS
Wrapped Flexbox Layout
.cards {
display:flex;
flex-wrap: wrap;
}
.card {
flex: 1 1 250px;
margin: 5px;
}
http://codepen.io/rachelandrew/pen/Gqvrwz
The Near Future of CSS
.cards {
display:grid;
grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
grid-gap: 10px;
}
http://codepen.io/rachelandrew/pen/VjzrgG
The Near Future of CSS
.cards {
display:grid;
grid-template-columns: repeat(12,1fr);
grid-gap: 10px;
}
.card:nth-child(1) { grid-column: 1 / 4; }
.card:nth-child(2) { grid-column: 1 / 4; grid-row: 2; }
.card:nth-child(3) { grid-column: 9 / 13; grid-row: 2; }
.card:nth-child(4) { grid-column: 4 / 10; }
.card:nth-child(5) { grid-column: 10 / 13; }
http://codepen.io/rachelandrew/pen/XKaZwa
The Near Future of CSS
.card:nth-child(1) { grid-area: side1; }
.card:nth-child(2) { grid-area: side2; }
.card:nth-child(3) { grid-area: side3; }
.card:nth-child(4) { grid-area: middle1; }
.card:nth-child(5) { grid-area: side4; }
.cards {
display:grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 10px;
grid-template-areas:
"side1 middle1 middle1 side3"
"side2 ....... ....... side4";
}
The Near Future of CSS
The Near Future of CSS
Lots of Grid Examples
http://gridbyexample.com
CSS Shapes
"CSS Shapes describe geometric shapes for use in CSS. For Level 1, CSS
Shapes can be applied to floats. A circle shape on a float will cause inline
content to wrap around the circle shape instead of the float’s bounding
box."
-- https://drafts.csswg.org/css-shapes/
The Near Future of CSS
A simple circle
.balloon {
float: left;
width: 429px;
shape-outside: circle(50%);
}
<div class="box">
<img class="balloon" src="round-balloon.png" alt="balloon">
<p>...</p>
</div>
http://codepen.io/rachelandrew/pen/KrvyQq
The Near Future of CSS
Floating generated content to use
Shapes
.box::before {
content: "";
display: block;
float: left;
width: 429px;
height: 409px;
shape-outside: circle(50%);
}
http://codepen.io/rachelandrew/pen/mErqxy
The Near Future of CSS
Shapes and clip-path
.balloon {
float: right;
width: 640px;
height: 427px;
shape-outside: ellipse(33% 50% at 460px);
-webkit-clip-path: ellipse(28% 50% at 460px);
clip-path: ellipse(28% 50% at 460px);
}
http://codepen.io/rachelandrew/pen/xOLPLa/
The Near Future of CSS
CSS Feature Queries with
@supports
Like Modernizr but in native CSS.
"The ‘@supports’ rule is a conditional group rule whose condition tests
whether the user agent supports CSS property:value pairs."
-- https://www.w3.org/TR/css3-conditional/#at-supports
The Near Future of CSS
Does my browser support
display: flex?
@supports (display: flex) {
.has-flex {
display: block;
background-color: #0084AD;
color: #fff;
}
}
Does my browser support
display: grid?
@supports (display: grid) {
.has-grid {
display: block;
background-color: #284C6D;
color: #fff;
}
}
Test more than 1 thing
@supports ((display: grid) and (shape-outside: circle())) {
.has-grid-shapes {
display: block;
background-color: #666;
color: #fff;
}
}
http://codepen.io/rachelandrew/pen/RRkWKX/
.balloon {
border: 1px solid #999;
padding: 2px;
}
@supports ((shape-outside: ellipse()) and ((clip-path: ellipse()) or (-webkit-clip-path:ellipse()))) {
.balloon {
border: none;
padding: 0;
float: right;
width: 640px;
min-width: 640px;
height: 427px;
shape-outside: ellipse(33% 50% at 460px);
-webkit-clip-path: ellipse(28% 50% at 460px);
clip-path: ellipse(28% 50% at 460px);
}
}
The Near Future of CSS
The Near Future of CSS
Using feature queries
» Write the css for older browsers
» Inside the feature query reset those properties
» Inside the feature query write your new CSS
http://codepen.io/rachelandrew/pen/vKJmXR
CSS Custom Properties
(CSS Variables!)
CSS Custom Properties
"This module introduces a family of custom author-defined properties
known collectively as custom properties, which allow an author to
assign arbitrary values to a property with an author-chosen name, and
the var() function, which allow an author to then use those values in
other properties elsewhere in the document."
-- https://drafts.csswg.org/css-variables/
:root {
--primary: blue;
--secondary: orange;
}
h1 {
color: var(--primary);
}
http://codepen.io/rachelandrew/pen/qNXpEZ
Testing for custom properties
:root {
--primary: blue;
--secondary: orange;
}
@supports (--primary: blue) {
h1 {
color: var(--primary);
}
h2 {
color: var(--secondary);
}
}
http://codepen.io/rachelandrew/pen/mErpZA
The Near Future of CSS
Getting Involved
CSS Specification discussion and
issues are on github
https://github.com/w3c/csswg-drafts
The Near Future of CSS
Raise issues with browsers
» Mozilla https://bugzilla.mozilla.org/
» Edge https://developer.microsoft.com/en-us/microsoft-edge/
platform/issues/
» Chrome https://bugs.chromium.org/p/chromium/issues/list
Request features
Directly request features where browsers give you the means to
do so.
Writing blog posts, presentations and demos also helps.
If we don’t ask we
don’t get
Make some noise for the new shiny!
Thank you!
@rachelandrew
https://cssgrid.me/melbjs

More Related Content

PDF
Confoo: You can use CSS for that!
PDF
CSS Grid Layout: An Event Apart Boston 2016
PDF
CSS Grid Layout for Topconf, Linz
PDF
CSS Grid Layout
PDF
The New CSS Layout - Dutch PHP Conference
PDF
Google Developers Experts Summit 2017 - CSS Layout
PPTX
Building calloutswithoutwsdl2apex
PDF
Laying out the future with grid & flexbox - Smashing Conf Freiburg
Confoo: You can use CSS for that!
CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout for Topconf, Linz
CSS Grid Layout
The New CSS Layout - Dutch PHP Conference
Google Developers Experts Summit 2017 - CSS Layout
Building calloutswithoutwsdl2apex
Laying out the future with grid & flexbox - Smashing Conf Freiburg

What's hot (20)

PDF
An Event Apart SF: CSS Grid Layout
PDF
CSS3 - is everything we used to do wrong?
PDF
Looking Back to Move Forward: Building the Modern Web
PDF
Compass, Sass, and the Enlightened CSS Developer
KEY
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
KEY
Sass, Compass
PDF
LESS
PPTX
Scalable and Modular CSS FTW!
PDF
Rapid Prototyping
PDF
Landing Pages 101
PDF
Preprocessor presentation
PDF
Think Vitamin CSS
PDF
CSSプリプロセッサの取扱説明書
PPT
CSS Preprocessors: LESS is more or look SASS-y trying
KEY
Taming CSS Selectors
KEY
Sass, Compass and the new tools - Open Web Camp IV
PDF
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
PDF
CSS Reset
PDF
PPTX
SASS is more than LESS
An Event Apart SF: CSS Grid Layout
CSS3 - is everything we used to do wrong?
Looking Back to Move Forward: Building the Modern Web
Compass, Sass, and the Enlightened CSS Developer
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Sass, Compass
LESS
Scalable and Modular CSS FTW!
Rapid Prototyping
Landing Pages 101
Preprocessor presentation
Think Vitamin CSS
CSSプリプロセッサの取扱説明書
CSS Preprocessors: LESS is more or look SASS-y trying
Taming CSS Selectors
Sass, Compass and the new tools - Open Web Camp IV
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
CSS Reset
SASS is more than LESS
Ad

Similar to The Near Future of CSS (20)

PDF
The Future of Frontend - what is new in CSS?
PDF
Next-level CSS
PDF
The Creative New World of CSS
PDF
GOTO Berlin - You can use CSS for that
PDF
What I discovered about layout vis CSS Grid
PDF
But what about old browsers?
PDF
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
PDF
CSS Conf Budapest - New CSS Layout
PDF
Fluent: Making Sense of the New CSS Layout
PDF
ConFoo 2016: Making Sense of CSS Layout
PDF
Evolution of CSS
PDF
View Source London: Solving Layout Problems with CSS Grid & Friends
PDF
Flexbox, Grid and Sass
PDF
Future Layout & Performance
PPT
Tutorial0eesrtjfzjgxkgxkxxkxkgxkgxjffj3.ppt
PDF
AEA Chicago CSS Grid Layout
PDF
Solving Layout Problems with CSS Grid & Friends - DevFest17
PDF
Solving Layout Problems with CSS Grid & Friends - WEBU17
PDF
Solving Layout Problems With CSS Grid and Friends
PDF
Solving Layout Problems with CSS Grid & Friends - NordicJS
The Future of Frontend - what is new in CSS?
Next-level CSS
The Creative New World of CSS
GOTO Berlin - You can use CSS for that
What I discovered about layout vis CSS Grid
But what about old browsers?
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
CSS Conf Budapest - New CSS Layout
Fluent: Making Sense of the New CSS Layout
ConFoo 2016: Making Sense of CSS Layout
Evolution of CSS
View Source London: Solving Layout Problems with CSS Grid & Friends
Flexbox, Grid and Sass
Future Layout & Performance
Tutorial0eesrtjfzjgxkgxkxxkxkgxkgxjffj3.ppt
AEA Chicago CSS Grid Layout
Solving Layout Problems with CSS Grid & Friends - DevFest17
Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems With CSS Grid and Friends
Solving Layout Problems with CSS Grid & Friends - NordicJS
Ad

More from Rachel Andrew (20)

PDF
All Day Hey! Unlocking The Power of CSS Grid Layout
PDF
SmashingConf SF: Unlocking the Power of CSS Grid Layout
PDF
Unlocking the Power of CSS Grid Layout
PDF
Into the Weeds of CSS Layout
PDF
Graduating to Grid
PDF
DevFest Nantes - Start Using CSS Grid Layout today
PDF
Start Using CSS Grid Layout Today - RuhrJS
PDF
404.ie: Solving Layout Problems with CSS Grid & Friends
PDF
Web Summer Camp Keynote
PDF
New CSS Layout Meets the Real World
PDF
An Event Apart DC - New CSS Layout meets the Real World
PDF
Perch, Patterns and Old Browsers
PDF
Evergreen websites for Evergreen browsers
PDF
Frontend United: Start using CSS Grid Layout today!
PDF
Where does CSS come from?
PDF
CSS Grid for html5j
PDF
Grid and Flexbox - Smashing Conf SF
PDF
An Event Apart Seattle - New CSS Layout Meets the Real World
PDF
Render Conf: Start using CSS Grid Layout Today
PDF
Laracon Online: Grid and Flexbox
All Day Hey! Unlocking The Power of CSS Grid Layout
SmashingConf SF: Unlocking the Power of CSS Grid Layout
Unlocking the Power of CSS Grid Layout
Into the Weeds of CSS Layout
Graduating to Grid
DevFest Nantes - Start Using CSS Grid Layout today
Start Using CSS Grid Layout Today - RuhrJS
404.ie: Solving Layout Problems with CSS Grid & Friends
Web Summer Camp Keynote
New CSS Layout Meets the Real World
An Event Apart DC - New CSS Layout meets the Real World
Perch, Patterns and Old Browsers
Evergreen websites for Evergreen browsers
Frontend United: Start using CSS Grid Layout today!
Where does CSS come from?
CSS Grid for html5j
Grid and Flexbox - Smashing Conf SF
An Event Apart Seattle - New CSS Layout Meets the Real World
Render Conf: Start using CSS Grid Layout Today
Laracon Online: Grid and Flexbox

Recently uploaded (20)

PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
CloudStack 4.21: First Look Webinar slides
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Five Habits of High-Impact Board Members
PPTX
Modernising the Digital Integration Hub
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
Module 1.ppt Iot fundamentals and Architecture
Build Your First AI Agent with UiPath.pptx
The influence of sentiment analysis in enhancing early warning system model f...
TEXTILE technology diploma scope and career opportunities
CloudStack 4.21: First Look Webinar slides
UiPath Agentic Automation session 1: RPA to Agents
Enhancing plagiarism detection using data pre-processing and machine learning...
Convolutional neural network based encoder-decoder for efficient real-time ob...
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Five Habits of High-Impact Board Members
Modernising the Digital Integration Hub
A proposed approach for plagiarism detection in Myanmar Unicode text
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Zenith AI: Advanced Artificial Intelligence
1 - Historical Antecedents, Social Consideration.pdf
STKI Israel Market Study 2025 version august
Getting started with AI Agents and Multi-Agent Systems
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions

The Near Future of CSS

  • 1. The Near Future of CSS Rachel Andrew
  • 2. Rachel Andrew » https://rachelandrew.co.uk » https://grabaperch.com » @rachelandrew » Invited Expert to the CSS Working Group » Google Developer Expert
  • 3. Box Alignment Level 3 This is the vertical centering module!
  • 4. Centre the content of .box .box { display: flex; align-items: center; justify-content: center; } <div class="box"> <img alt="balloon" src="square-balloon.jpg"> </div> http://codepen.io/rachelandrew/pen/XKaZWm
  • 6. CSS Box Alignment Level 3 "The box alignment properties in CSS are a set of 6 properties that control alignment of boxes within other boxes." -- https://drafts.csswg.org/css-align/
  • 7. CSS Box Alignment Level 3 Defines: » justify-content » align-content » justify-self » align-self » justify-items » align-items
  • 9. .wrapper { display: flex; } .wrapper li { min-width: 1%; flex: 1 0 25%; } .wrapper li:nth-child(2) { align-self: center; } .wrapper li:nth-child(3) { align-self: flex-start; } .wrapper li:nth-child(4) { align-self: flex-end; } http://codepen.io/rachelandrew/pen/RavbmN
  • 10. The Box Alignment spec defines how these properties work in other layout methods
  • 11. .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; } .wrapper li { min-width: 1%; } .wrapper li:nth-child(2) { align-self: center; } .wrapper li:nth-child(3) { align-self: start; } .wrapper li:nth-child(4) { align-self: end; } http://codepen.io/rachelandrew/pen/jqdNoL
  • 12. CSS Grid Layout "Unlike Flexbox, however, which is single-axis–oriented, Grid Layout is optimized for 2-dimensional layouts: those in which alignment of content is desired in both dimensions." -- https://drafts.csswg.org/css-grid/
  • 13. Defining a simple grid .cards { display:grid; grid-template-columns: 1fr 1fr 1fr; grid-gap: 10px; }
  • 14. The fr unit Defines a fraction unit - a fraction of the available space. Works in a similar way to using flex-grow with a positive value.
  • 16. Wrapped Flexbox Layout .cards { display:flex; flex-wrap: wrap; } .card { flex: 1 1 250px; margin: 5px; } http://codepen.io/rachelandrew/pen/Gqvrwz
  • 18. .cards { display:grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); grid-gap: 10px; } http://codepen.io/rachelandrew/pen/VjzrgG
  • 20. .cards { display:grid; grid-template-columns: repeat(12,1fr); grid-gap: 10px; } .card:nth-child(1) { grid-column: 1 / 4; } .card:nth-child(2) { grid-column: 1 / 4; grid-row: 2; } .card:nth-child(3) { grid-column: 9 / 13; grid-row: 2; } .card:nth-child(4) { grid-column: 4 / 10; } .card:nth-child(5) { grid-column: 10 / 13; } http://codepen.io/rachelandrew/pen/XKaZwa
  • 22. .card:nth-child(1) { grid-area: side1; } .card:nth-child(2) { grid-area: side2; } .card:nth-child(3) { grid-area: side3; } .card:nth-child(4) { grid-area: middle1; } .card:nth-child(5) { grid-area: side4; }
  • 23. .cards { display:grid; grid-template-columns: repeat(4, 1fr); grid-gap: 10px; grid-template-areas: "side1 middle1 middle1 side3" "side2 ....... ....... side4"; }
  • 26. Lots of Grid Examples http://gridbyexample.com
  • 27. CSS Shapes "CSS Shapes describe geometric shapes for use in CSS. For Level 1, CSS Shapes can be applied to floats. A circle shape on a float will cause inline content to wrap around the circle shape instead of the float’s bounding box." -- https://drafts.csswg.org/css-shapes/
  • 29. A simple circle .balloon { float: left; width: 429px; shape-outside: circle(50%); } <div class="box"> <img class="balloon" src="round-balloon.png" alt="balloon"> <p>...</p> </div> http://codepen.io/rachelandrew/pen/KrvyQq
  • 31. Floating generated content to use Shapes .box::before { content: ""; display: block; float: left; width: 429px; height: 409px; shape-outside: circle(50%); } http://codepen.io/rachelandrew/pen/mErqxy
  • 33. Shapes and clip-path .balloon { float: right; width: 640px; height: 427px; shape-outside: ellipse(33% 50% at 460px); -webkit-clip-path: ellipse(28% 50% at 460px); clip-path: ellipse(28% 50% at 460px); } http://codepen.io/rachelandrew/pen/xOLPLa/
  • 35. CSS Feature Queries with @supports Like Modernizr but in native CSS. "The ‘@supports’ rule is a conditional group rule whose condition tests whether the user agent supports CSS property:value pairs." -- https://www.w3.org/TR/css3-conditional/#at-supports
  • 37. Does my browser support display: flex? @supports (display: flex) { .has-flex { display: block; background-color: #0084AD; color: #fff; } }
  • 38. Does my browser support display: grid? @supports (display: grid) { .has-grid { display: block; background-color: #284C6D; color: #fff; } }
  • 39. Test more than 1 thing @supports ((display: grid) and (shape-outside: circle())) { .has-grid-shapes { display: block; background-color: #666; color: #fff; } } http://codepen.io/rachelandrew/pen/RRkWKX/
  • 40. .balloon { border: 1px solid #999; padding: 2px; } @supports ((shape-outside: ellipse()) and ((clip-path: ellipse()) or (-webkit-clip-path:ellipse()))) { .balloon { border: none; padding: 0; float: right; width: 640px; min-width: 640px; height: 427px; shape-outside: ellipse(33% 50% at 460px); -webkit-clip-path: ellipse(28% 50% at 460px); clip-path: ellipse(28% 50% at 460px); } }
  • 43. Using feature queries » Write the css for older browsers » Inside the feature query reset those properties » Inside the feature query write your new CSS http://codepen.io/rachelandrew/pen/vKJmXR
  • 45. CSS Custom Properties "This module introduces a family of custom author-defined properties known collectively as custom properties, which allow an author to assign arbitrary values to a property with an author-chosen name, and the var() function, which allow an author to then use those values in other properties elsewhere in the document." -- https://drafts.csswg.org/css-variables/
  • 46. :root { --primary: blue; --secondary: orange; } h1 { color: var(--primary); } http://codepen.io/rachelandrew/pen/qNXpEZ
  • 47. Testing for custom properties :root { --primary: blue; --secondary: orange; } @supports (--primary: blue) { h1 { color: var(--primary); } h2 { color: var(--secondary); } } http://codepen.io/rachelandrew/pen/mErpZA
  • 49. Getting Involved CSS Specification discussion and issues are on github https://github.com/w3c/csswg-drafts
  • 51. Raise issues with browsers » Mozilla https://bugzilla.mozilla.org/ » Edge https://developer.microsoft.com/en-us/microsoft-edge/ platform/issues/ » Chrome https://bugs.chromium.org/p/chromium/issues/list
  • 52. Request features Directly request features where browsers give you the means to do so. Writing blog posts, presentations and demos also helps.
  • 53. If we don’t ask we don’t get Make some noise for the new shiny!