SlideShare a Scribd company logo
The Right Layout Tool
for the Job.
Rachel Andrew, 

WebExpo, Prague 2016
Rachel Andrew
rachelandrew.co.uk
@rachelandrew
CSS Working Group Invited Expert
Google Developer Expert for Web Technologies
Co-founder Perch CMS: https://grabaperch.com
Contact: me@rachelandrew.co.uk
Modern CSS Layout?
• Floats
• Inline-block
• display: table
• Absolute & Relative positioning
• Frameworks … lots of frameworks
Our great hopes for layout
• Flexbox

https://drafts.csswg.org/css-flexbox/
• CSS Grid Layout

https://drafts.csswg.org/css-grid/
• Box Alignment

https://drafts.csswg.org/css-align/
Getting Flexible
The justify-
content property
is set to space-
between.
The items at each
end are placed
against the
container and the
remaining space
distributed evenly.
nav ul{
display: flex;
justify-content: space-between;
}
The justify-
content property
is set to space-
around.
The items are
evenly distributed
in the container
with a half size
space at each end.
nav ul{
display: flex;
justify-content: space-around;
}
The flex property
• flex-grow - add space
• flex-shrink - remove space
• flex-basis - the initial size before any growing
or shrinking
The initial width of
our li is 300
pixels, however it
can grow larger
and shrink smaller
than 300 pixels.
.wrapper {
display: flex;
}
.wrapper li {
flex: 1 1 300px;
min-width: 1px;
}
If the value of
flex-grow is 0 the
boxes cannot
grow.
.wrapper {
display: flex;
}
.wrapper li {
flex: 0 1 300px;
min-width: 1px;
}
If the value of
flex-shrink is 0
the boxes cannot
shrink.
.wrapper {
display: flex;
}
.wrapper li {
flex: 1 0 300px;
min-width: 1px;
}
Setting flex-grow
to 2 on the 3 item.
.wrapper li {
flex: 1 1 300px;
min-width: 1px;
}
.wrapper li:nth-child(3) {
flex-grow: 2;
}
With flex-basis 0
all the available
space is up for
grabs and can be
assigned
according to the
flex-grow value.
.wrapper li {
flex: 1 1 0;
min-width: 1px;
}
.wrapper li:nth-child(3) {
flex-grow: 2;
}
http://madebymike.com.au/demos/flexbox-tester/
The wonderful world of ‘auto’
https://drafts.csswg.org/css-flexbox/#valdef-flex-basis-auto
“When specified on a flex item, the
auto keyword retrieves the value of
the main size property as the used
flex-basis. If that value is itself auto,
then the used value is content.”
The ‘main size’
For flex items:
if flex-direction is row, main size is width
if flex-direction is column, main size is height
flex-basis: auto
If the item has a main size then it will be used for
the flex-basis value.
Otherwise, flex-basis is set to ‘content’.
The flex-basis for
the items inside
wrapper is auto.
The items have no
main size and so
the defaults to
content.
.box {
width: 600px;
}
.wrapper {
display: flex;
}
.wrapper > div {
flex: 1 1 auto;
}
flex-basis: auto
I don’t need to
change my CSS
for the flex-basis
to respect the
component width.
.box {
width: 600px;
}
.wrapper {
display: flex;
}
.wrapper > div {
flex: 1 1 auto;
}
flex-basis: auto 600px
I want this bar aligned to the bottom
Making each card
a flex container
means we can
use flexbox for
the alignment.
/* the wrapper */
.inner {
display: flex;
}
/* the cards */
.card {
flex: 1 1 0;
display: flex;
flex-direction: column;
}
/* the stretching content */
.content {
flex: 1 1 auto;
}
flex: 1 1 300px;
flex-grow: 1
flex-shrink: 1;
flex-basis:
300px;
If we allow the
flex items to
wrap we can see
how flex-basis
works by
dragging the
window smaller.
.wrapper {
display: flex;
flex-flow: row wrap;
}
.wrapper li {
flex: 1 1 300px;
min-width: 1px;
}
flex: 1 1 300px;
flex-grow: 1;
flex-shrink: 1;
flex-basis:
300px;
The 3rd item has
flex: 0 1 300px;
so cannot grow.
.wrapper {
display: flex;
}
.wrapper li {
flex: 1 1 300px;
min-width: 1px;
}
.wrapper li:nth-child(3) {
flex: 0 1 300px;
}
CSS Grid Layout
I am creating
three grid column
tracks, all 1fr in
width.
This gives me
three equally
sized column
tracks.
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
If I create the first
column as 600
pixels and then
have two 1fr
columns the 600
pixel track is
removed from the
available space
and the remainder
is distributed
equally between
the two columns.
.wrapper {
display: grid;
grid-template-columns: 600px 1fr 1fr;
}
With a 600 pixel
column, a 1fr and
a 3fr column. The
600 pixels is
removed from the
available space
then the
remaining space is
divided by 4.
The 1fr column
gets 25% and the
3fr column 75%.
.wrapper {
display: grid;
grid-template-columns: 600px 1fr 3fr;
}
Flexbox for 1 dimensional layout.
CSS Grid is for 2 dimensional
layout.
repeat notation.
These two track
listings are the
same.
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.wrapper {
display: grid;
grid-template-columns: repeat(4, 1fr);
}
minmax()
Declare a
minimum and a
maximum size for
tracks.
.wrapper {
display: grid;
grid-auto-rows: minmax(200px, 400px);
}
The value of the
grid-template-
columns property
says:
repeat this track
listing, auto-filing
as many columns
with a minimum
width of 300
pixels and a
maximum of 1fr.
.wrapper {
display: grid;
grid-template-columns: 

repeat(auto-fill, minmax(300px, 1fr));
}
Grid auto-placement
My grid auto-fills
columns with a
minimum width
of 80px and a
maximum width
of 1fr.
The rows will also
use minmax() to
by at least 80px
tall.
.colors {
display: grid;
grid-template-columns:
repeat(auto-fill,minmax(80px, 1fr));
grid-gap: 2px;
grid-auto-rows:
minmax(80px, auto);
}
Some items span
2 column tracks.
Some span 3
column tracks.
Some blocks are
tall and span 4
row tracks.
.span2 {
grid-column-end: span 2;
grid-row-end: span 2;
}
.span3 {
grid-column-end: span 3;
grid-row-end: span 3;
}
.tall4 {
grid-row-end: span 4;
}
The grid-auto-
flow property can
be set to dense.
This enables a
dense ‘packing
mode’.
.colors {
display: grid;
grid-template-columns: repeat(auto-
fill,minmax(80px, 1fr));
grid-gap: 2px;
grid-auto-rows: minmax(80px, auto);
grid-auto-flow: dense;
}
Any items with a
position on the
grid are placed
before auto-
placed items.
.white {
grid-column: 1 / -1;
grid-row: 3;
}
.black {
grid-column: 1 / -1;
grid-row: 6;
}
Grid Item Placement
I have created a
grid on my
wrapper element.
The grid has 3
equal width
columns.
Rows will be
created as
required as we
position items
into them.
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
The class
‘wrapper’ is on a
ul element.
<ul class="wrapper">
<li class="one">
<h3>1.</h3>
</li>
<li class="two">
<h3>2.</h3>
</li>
<li class="three">
<h3>3.</h3>
</li>
<li class="four">
<h3>4.</h3>
</li>
<li class="five">
<h3>5.</h3>
</li>
</ul>
I am positioning
my elements
using CSS Grid
Layout line-based
positioning.
Setting a column
and a row line
using the grid-
column and grid-
row properties.
.one {
grid-column: 1 / 3;
grid-row: 2 / 4;
}
.two {
grid-column: 3;
grid-row: 1 / 3;
}
.three {
grid-column: 3;
grid-row: 3;
}
.four {
grid-column: 1;
grid-row: 1 / 3;
}
.five {
grid-column: 2 / 4;
grid-row: 1 ;
}
Alignment
CSS Box Alignment Module Level 3
“This module contains the features of CSS relating to the
alignment of boxes within their containers in the various CSS
box layout models: block layout, table layout, flex layout, and
grid layout.” - https://drafts.csswg.org/css-align/
It’s 2016. We can now centre
things.
Box Alignment Properties
- justify-content
- align-content
- justify-self
- align-self
- justify-items
- align-items
The justify-
content property
is set to space-
between.
The items at each
end are placed
against the
container and the
remaining space
distributed evenly.
nav ul{
display: flex;
justify-content: space-between;
flex-direction: row;
}
The justify-
content property
is set to space-
around.
The items are
evenly distributed
in the container
with a half size
space at each end.
nav ul{
display: flex;
justify-content: space-around;
flex-direction: row;
}
If there is space in
the grid container
after all column
and row tracks
have been added.
Use space-around
and space-
between to space
the tracks.
.wrapper {
width: 500px;
height: 400px;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 80px);
grid-template-rows: repeat(3,100px);
align-content: space-around;
justify-content: space-between;
}
The value of align-
items is stretch
by default.
If I add extra text
in one navigation
point the others
all take the same
height.
nav ul{
display: flex;
justify-content: space-around;
flex-direction: row;
align-items: stretch;
}
If I set the value
of align-items to
center then we
get vertical
centring.
nav ul{
display: flex;
justify-content: space-around;
flex-direction: row;
align-items: center;
}
My grid has an
absolute width
and height. This is
larger than
required for the
tracks.
.wrapper {
width: 500px;
height: 400px;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 80px);
grid-template-rows: repeat(3,100px);
}
The align-content
property controls
the block axis.
This axis aligns
the grid rows.
.wrapper {
width: 500px;
height: 400px;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 80px);
grid-template-rows: repeat(3,100px);
align-content: end;
}
The justify-
content property
controls the inline
axis.
This axis aligns
the grid columns.
.wrapper {
width: 500px;
height: 400px;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 80px);
grid-template-rows: repeat(3,100px);
align-content: end;
justify-content: center;
}
I can create this
same layout with
flexbox or Grid.
With flexbox the
items are laid out
in a row.
.wrapper {
display: flex;
}
.wrapper li {
flex: 1 0 25%;
}
The first item is at
the default
stretch and as the
tallest item is
dictating the
height of the flex
container.
The second is
entered in the
container.
The third aligned
to the start.
The fourth aligned
to the end.
.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;
}
For Grid I use a
single row, 4
column Grid.
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
Grid alignment
properties for the
three landscape
images.
.wrapper li:nth-child(2) {
align-self: center;
}
.wrapper li:nth-child(3) {
align-self: start;
}
.wrapper li:nth-child(4) {
align-self: end;
}
Putting it together: a form
100vh
body {
align-content: center;
justify-content: center;
}
Aligning the grid.
body {
height: 100vh;
display: grid;
grid-template-columns: 80%;
align-content: center;
justify-content: center;
}
.account {
align-self: end;
}
1fr
1fr
1fr 1fr 1fr
2fr
2fr
.login > div
.login > div
.login > div.actions
Setting align-
items to centre
lines the fields
and labels up on
their centre line.
.login > div {
display: grid;
grid-template-columns: 1fr 2fr;
align-items: center;
}
.login > div.actions {
grid-template-columns: 1fr 1fr 1fr;
}
Hero Panels
Using the
minmax()
function with
grid-auto-rows.
.home-hero {
display: grid;
grid-gap: 1px;
grid-auto-rows: minmax(150px,
auto);
}
An item on the
grid can become a
grid or flex
container itself.
In this case I am
using flexbox and
auto margins to
push my content
to the bottom of
the box.
.special {
display: flex;
flex-direction: column;
}
.special h3{
margin-top: auto;
}
But, what about old browsers?!
http://caniuse.com/#feat=css-grid
http://caniuse.com/#feat=css-grid
http://gridbyexample.com/browsers
Say hello to Feature Queries.
I have set three
classes to
display: none;
.has-flex,
.has-grid,
.has-grid-shapes {
display: none;
}
My @supports
rule tests for
support of the
display property
with a value of
flex.
If it is supported
we show the div.
@supports (display: flex) {
.has-flex {
display: block;
}
}
My @supports
rule tests for
support of the
display property
with a value of
grid.
If it is supported
we show the div.
@supports (display: grid) {
.has-grid {
display: block;
}
}
My @supports
rule tests for
support of the
display property
with a value of
grid AND shape-
outside:circle.
If it is supported
we show the div.
@supports (display: grid) and
(shape-outside:circle()) {
.has-grid-shapes {
display: block;
}
}
http://caniuse.com/#feat=css-featurequeries
Defaults for all
browsers will be
loaded by even
really old
browsers.
body {
padding-top: 20%;
}
h1,
.login,
.account,
.contact{
width:80%;
margin: 0 auto;
}
Within a Feature
Query we add
some information
for flexbox
supporting
browsers.
@supports (display: flex) {
body {
padding:0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
h1, .login, .account, .contact {
margin: 0;
width: 80%;
}
}
The Feature
Query for Grid
supporting
browsers.
@supports (display: grid) {
body {
display: grid;
grid-template-columns: 80%;
align-content: center;
align-items: stretch;
}
@media (min-width: 650px) {
body {
grid-template-columns: repeat(2, minmax(150px, 30%));
}
h1,
.login {
grid-column-end: span 2;
width: auto;
}
.login > div {
display: grid;
grid-template-columns: 1fr 2fr;
align-items: center;
}
.login > div.actions {
grid-template-columns: 1fr 1fr 1fr;
}
.account {
border-right: 1px dotted rgb(191, 216, 227);
padding: 0 10px 0 0;
align-self: end;
width: auto;
}
.contact {
padding: 0 0 0 10px;
width: auto;
}
}
}
Your users ‘grow into’
enhancements as their browsers
auto-update.
Accessibility
Power and responsibility
• Good = creating the most accessible source
order and using Grid or Flexbox to get the
optimal display for each device.
• Bad = using Grid or Flexbox as an excuse to
forget about the source.
• Terrible - stripping out semantic elements to
make everything a grid or flex item.
Léonie Watson | On CSS
accessibility and drinking tea | CSS
Day 2016
https://vimeo.com/180566024
Also see: 

http://tink.uk/flexbox-the-keyboard-navigation-disconnect/
https://drafts.csswg.org/css-grid/#order-accessibility
“Authors must use order and the grid-
placement properties only for visual,
not logical, reordering of content.
Style sheets that use these features to
perform logical reordering are non-
conforming.”
Performance
https://jakearchibald.com/2014/dont-use-flexbox-for-page-layout/
https://blogs.igalia.com/jfernandez/2015/06/24/performance-on-grid-layout/
Why are we looking at something I
can’t use yet?
https://wiki.csswg.org/ideas/mistakes
Get involved with developing specs!
• While a spec is being developed your feedback
is wanted and can be included in the spec.
• Wait until browsers ship and you lose that
chance.
• It just got easier. CSS Spec issues are now on
GitHub.

http://logs.csswg.org/irc.w3.org/css/2016-05-10/#e684439
Do a good deed for your future self.
Thank you
Slides & Resources: https://cssgrid.me/WebExpo16
http://csslayout.news - sign up for my weekly CSS Layout email
—
@rachelandrew | me@rachelandrew.co.uk
—
https://rachelandrew.co.uk | https://grabaperch.com

More Related Content

What's hot

Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid Layout
Rachel Andrew
 
CSSConf.asia - Laying out the future
CSSConf.asia - Laying out the futureCSSConf.asia - Laying out the future
CSSConf.asia - Laying out the future
Rachel Andrew
 
CSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart OrlandoCSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart Orlando
Rachel Andrew
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
Rachel Andrew
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
Rachel Andrew
 
Confoo: The New CSS Layout
Confoo: The New CSS LayoutConfoo: The New CSS Layout
Confoo: The New CSS Layout
Rachel Andrew
 
CSS Grid Layout - All Things Open
CSS Grid Layout - All Things OpenCSS Grid Layout - All Things Open
CSS Grid Layout - All Things Open
Rachel Andrew
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and Flexbox
Rachel Andrew
 
Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!
Rachel Andrew
 
Grid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SFGrid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SF
Rachel Andrew
 
CSS Grid for html5j
CSS Grid for html5jCSS Grid for html5j
CSS Grid for html5j
Rachel Andrew
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
Rachel Andrew
 
An Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid LayoutAn Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid Layout
Rachel Andrew
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
Rachel Andrew
 
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
Igalia
 
An Event Apart Seattle - New CSS Layout Meets the Real World
An Event Apart Seattle - New CSS Layout Meets the Real WorldAn Event Apart Seattle - New CSS Layout Meets the Real World
An Event Apart Seattle - New CSS Layout Meets the Real World
Rachel Andrew
 
The New CSS Layout - dotCSS
The New CSS Layout - dotCSSThe New CSS Layout - dotCSS
The New CSS Layout - dotCSS
Rachel Andrew
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
Rachel Andrew
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid Layout
Rachel Andrew
 
Future Layout & Performance
Future Layout & PerformanceFuture Layout & Performance
Future Layout & Performance
Rachel Andrew
 

What's hot (20)

Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid Layout
 
CSSConf.asia - Laying out the future
CSSConf.asia - Laying out the futureCSSConf.asia - Laying out the future
CSSConf.asia - Laying out the future
 
CSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart OrlandoCSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart Orlando
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
 
Confoo: The New CSS Layout
Confoo: The New CSS LayoutConfoo: The New CSS Layout
Confoo: The New CSS Layout
 
CSS Grid Layout - All Things Open
CSS Grid Layout - All Things OpenCSS Grid Layout - All Things Open
CSS Grid Layout - All Things Open
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and Flexbox
 
Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!
 
Grid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SFGrid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SF
 
CSS Grid for html5j
CSS Grid for html5jCSS Grid for html5j
CSS Grid for html5j
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
An Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid LayoutAn Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid Layout
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
 
An Event Apart Seattle - New CSS Layout Meets the Real World
An Event Apart Seattle - New CSS Layout Meets the Real WorldAn Event Apart Seattle - New CSS Layout Meets the Real World
An Event Apart Seattle - New CSS Layout Meets the Real World
 
The New CSS Layout - dotCSS
The New CSS Layout - dotCSSThe New CSS Layout - dotCSS
The New CSS Layout - dotCSS
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid Layout
 
Future Layout & Performance
Future Layout & PerformanceFuture Layout & Performance
Future Layout & Performance
 

Viewers also liked

10 praktických CSS3 a SVG řešení
10 praktických  CSS3 a SVG řešení10 praktických  CSS3 a SVG řešení
10 praktických CSS3 a SVG řešení
Martin Michálek
 
Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)
Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)
Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)
Ondřej Machulda
 
RFM analýza
RFM analýzaRFM analýza
RFM analýza
Taste Medio
 
Contribution & Confidence, All Things Open Keynote
Contribution & Confidence, All Things Open KeynoteContribution & Confidence, All Things Open Keynote
Contribution & Confidence, All Things Open Keynote
Rachel Andrew
 
Conference Speakers
Conference SpeakersConference Speakers
Conference Speakers
Rachel Andrew
 
Knowing it all
Knowing it allKnowing it all
Knowing it all
Rachel Andrew
 
Menoovr
Menoovr Menoovr
Menoovr
menoovr
 
Hoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 ConferenceHoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 Conference
Marc René Gardeya
 
Open Standards in the Walled Garden
Open Standards in the Walled GardenOpen Standards in the Walled Garden
Open Standards in the Walled Garden
digitalbindery
 
Confoo: You can use CSS for that!
Confoo: You can use CSS for that!Confoo: You can use CSS for that!
Confoo: You can use CSS for that!
Rachel Andrew
 
Driving the Future of Smart Cities - How to Beat the Traffic
Driving the Future of Smart Cities - How to Beat the TrafficDriving the Future of Smart Cities - How to Beat the Traffic
Driving the Future of Smart Cities - How to Beat the Traffic
VMware Tanzu
 
The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?
Rachel Andrew
 
Terry Jones TOC 2011 slides
Terry Jones TOC 2011 slidesTerry Jones TOC 2011 slides
Terry Jones TOC 2011 slides
Fluidinfo
 

Viewers also liked (15)

10 praktických CSS3 a SVG řešení
10 praktických  CSS3 a SVG řešení10 praktických  CSS3 a SVG řešení
10 praktických CSS3 a SVG řešení
 
Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)
Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)
Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)
 
RFM analýza
RFM analýzaRFM analýza
RFM analýza
 
Contribution & Confidence, All Things Open Keynote
Contribution & Confidence, All Things Open KeynoteContribution & Confidence, All Things Open Keynote
Contribution & Confidence, All Things Open Keynote
 
Conference Speakers
Conference SpeakersConference Speakers
Conference Speakers
 
Knowing it all
Knowing it allKnowing it all
Knowing it all
 
Menoovr
Menoovr Menoovr
Menoovr
 
Hoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 ConferenceHoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 Conference
 
Open Standards in the Walled Garden
Open Standards in the Walled GardenOpen Standards in the Walled Garden
Open Standards in the Walled Garden
 
Demand Media
Demand MediaDemand Media
Demand Media
 
Kevin Kelly
Kevin KellyKevin Kelly
Kevin Kelly
 
Confoo: You can use CSS for that!
Confoo: You can use CSS for that!Confoo: You can use CSS for that!
Confoo: You can use CSS for that!
 
Driving the Future of Smart Cities - How to Beat the Traffic
Driving the Future of Smart Cities - How to Beat the TrafficDriving the Future of Smart Cities - How to Beat the Traffic
Driving the Future of Smart Cities - How to Beat the Traffic
 
The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?
 
Terry Jones TOC 2011 slides
Terry Jones TOC 2011 slidesTerry Jones TOC 2011 slides
Terry Jones TOC 2011 slides
 

Similar to The Right Layout Tool for the Job

CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS Layout
Rachel Andrew
 
But what about old browsers?
But what about old browsers?But what about old browsers?
But what about old browsers?
Rachel Andrew
 
Fluent: Making Sense of the New CSS Layout
Fluent: Making Sense of the New CSS LayoutFluent: Making Sense of the New CSS Layout
Fluent: Making Sense of the New CSS Layout
Rachel Andrew
 
ConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS LayoutConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS Layout
Rachel Andrew
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
Rachel Andrew
 
DevFest Nantes - Start Using CSS Grid Layout today
DevFest Nantes - Start Using CSS Grid Layout todayDevFest Nantes - Start Using CSS Grid Layout today
DevFest Nantes - Start Using CSS Grid Layout today
Rachel Andrew
 
Laying out the future with grid & flexbox - Smashing Conf Freiburg
Laying out the future with grid & flexbox - Smashing Conf FreiburgLaying out the future with grid & flexbox - Smashing Conf Freiburg
Laying out the future with grid & flexbox - Smashing Conf Freiburg
Rachel Andrew
 
SmashingConf SF: Unlocking the Power of CSS Grid Layout
SmashingConf SF: Unlocking the Power of CSS Grid LayoutSmashingConf SF: Unlocking the Power of CSS Grid Layout
SmashingConf SF: Unlocking the Power of CSS Grid Layout
Rachel Andrew
 
All Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid LayoutAll Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid Layout
Rachel Andrew
 
Unlocking the Power of CSS Grid Layout
Unlocking the Power of CSS Grid LayoutUnlocking the Power of CSS Grid Layout
Unlocking the Power of CSS Grid Layout
Rachel Andrew
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJS
Rachel Andrew
 
Evergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersEvergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsers
Rachel Andrew
 
View Source London: Solving Layout Problems with CSS Grid & Friends
View Source London: Solving Layout Problems with CSS Grid & FriendsView Source London: Solving Layout Problems with CSS Grid & Friends
View Source London: Solving Layout Problems with CSS Grid & Friends
Rachel Andrew
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
Rachel Andrew
 
Solving Layout Problems with CSS Grid & Friends - DevFest17
Solving Layout Problems with CSS Grid & Friends - DevFest17Solving Layout Problems with CSS Grid & Friends - DevFest17
Solving Layout Problems with CSS Grid & Friends - DevFest17
Rachel Andrew
 
Solving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJSSolving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJS
Rachel Andrew
 
Solving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and FriendsSolving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and Friends
FITC
 
Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17
Rachel Andrew
 
Devoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid LayoutDevoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid Layout
Rachel Andrew
 
404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends
Rachel Andrew
 

Similar to The Right Layout Tool for the Job (20)

CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS Layout
 
But what about old browsers?
But what about old browsers?But what about old browsers?
But what about old browsers?
 
Fluent: Making Sense of the New CSS Layout
Fluent: Making Sense of the New CSS LayoutFluent: Making Sense of the New CSS Layout
Fluent: Making Sense of the New CSS Layout
 
ConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS LayoutConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS Layout
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
DevFest Nantes - Start Using CSS Grid Layout today
DevFest Nantes - Start Using CSS Grid Layout todayDevFest Nantes - Start Using CSS Grid Layout today
DevFest Nantes - Start Using CSS Grid Layout today
 
Laying out the future with grid & flexbox - Smashing Conf Freiburg
Laying out the future with grid & flexbox - Smashing Conf FreiburgLaying out the future with grid & flexbox - Smashing Conf Freiburg
Laying out the future with grid & flexbox - Smashing Conf Freiburg
 
SmashingConf SF: Unlocking the Power of CSS Grid Layout
SmashingConf SF: Unlocking the Power of CSS Grid LayoutSmashingConf SF: Unlocking the Power of CSS Grid Layout
SmashingConf SF: Unlocking the Power of CSS Grid Layout
 
All Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid LayoutAll Day Hey! Unlocking The Power of CSS Grid Layout
All Day Hey! Unlocking The Power of CSS Grid Layout
 
Unlocking the Power of CSS Grid Layout
Unlocking the Power of CSS Grid LayoutUnlocking the Power of CSS Grid Layout
Unlocking the Power of CSS Grid Layout
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJS
 
Evergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersEvergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsers
 
View Source London: Solving Layout Problems with CSS Grid & Friends
View Source London: Solving Layout Problems with CSS Grid & FriendsView Source London: Solving Layout Problems with CSS Grid & Friends
View Source London: Solving Layout Problems with CSS Grid & Friends
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
Solving Layout Problems with CSS Grid & Friends - DevFest17
Solving Layout Problems with CSS Grid & Friends - DevFest17Solving Layout Problems with CSS Grid & Friends - DevFest17
Solving Layout Problems with CSS Grid & Friends - DevFest17
 
Solving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJSSolving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJS
 
Solving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and FriendsSolving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and Friends
 
Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17
 
Devoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid LayoutDevoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid Layout
 
404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends
 

More from Rachel Andrew

Into the Weeds of CSS Layout
Into the Weeds of CSS LayoutInto the Weeds of CSS Layout
Into the Weeds of CSS Layout
Rachel Andrew
 
Graduating to Grid
Graduating to GridGraduating to Grid
Graduating to Grid
Rachel Andrew
 
Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout
Rachel Andrew
 
Web Summer Camp Keynote
Web Summer Camp KeynoteWeb Summer Camp Keynote
Web Summer Camp Keynote
Rachel Andrew
 
New CSS Layout Meets the Real World
New CSS Layout Meets the Real WorldNew CSS Layout Meets the Real World
New CSS Layout Meets the Real World
Rachel Andrew
 
An Event Apart DC - New CSS Layout meets the Real World
An Event Apart DC - New CSS Layout meets the Real WorldAn Event Apart DC - New CSS Layout meets the Real World
An Event Apart DC - New CSS Layout meets the Real World
Rachel Andrew
 
Perch, Patterns and Old Browsers
Perch, Patterns and Old BrowsersPerch, Patterns and Old Browsers
Perch, Patterns and Old Browsers
Rachel Andrew
 
Where does CSS come from?
Where does CSS come from?Where does CSS come from?
Where does CSS come from?
Rachel Andrew
 

More from Rachel Andrew (8)

Into the Weeds of CSS Layout
Into the Weeds of CSS LayoutInto the Weeds of CSS Layout
Into the Weeds of CSS Layout
 
Graduating to Grid
Graduating to GridGraduating to Grid
Graduating to Grid
 
Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout
 
Web Summer Camp Keynote
Web Summer Camp KeynoteWeb Summer Camp Keynote
Web Summer Camp Keynote
 
New CSS Layout Meets the Real World
New CSS Layout Meets the Real WorldNew CSS Layout Meets the Real World
New CSS Layout Meets the Real World
 
An Event Apart DC - New CSS Layout meets the Real World
An Event Apart DC - New CSS Layout meets the Real WorldAn Event Apart DC - New CSS Layout meets the Real World
An Event Apart DC - New CSS Layout meets the Real World
 
Perch, Patterns and Old Browsers
Perch, Patterns and Old BrowsersPerch, Patterns and Old Browsers
Perch, Patterns and Old Browsers
 
Where does CSS come from?
Where does CSS come from?Where does CSS come from?
Where does CSS come from?
 

Recently uploaded

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

The Right Layout Tool for the Job

  • 1. The Right Layout Tool for the Job. Rachel Andrew, 
 WebExpo, Prague 2016
  • 2. Rachel Andrew rachelandrew.co.uk @rachelandrew CSS Working Group Invited Expert Google Developer Expert for Web Technologies Co-founder Perch CMS: https://grabaperch.com Contact: me@rachelandrew.co.uk
  • 3. Modern CSS Layout? • Floats • Inline-block • display: table • Absolute & Relative positioning • Frameworks … lots of frameworks
  • 4. Our great hopes for layout • Flexbox
 https://drafts.csswg.org/css-flexbox/ • CSS Grid Layout
 https://drafts.csswg.org/css-grid/ • Box Alignment
 https://drafts.csswg.org/css-align/
  • 6. The justify- content property is set to space- between. The items at each end are placed against the container and the remaining space distributed evenly. nav ul{ display: flex; justify-content: space-between; }
  • 7. The justify- content property is set to space- around. The items are evenly distributed in the container with a half size space at each end. nav ul{ display: flex; justify-content: space-around; }
  • 8. The flex property • flex-grow - add space • flex-shrink - remove space • flex-basis - the initial size before any growing or shrinking
  • 9. The initial width of our li is 300 pixels, however it can grow larger and shrink smaller than 300 pixels. .wrapper { display: flex; } .wrapper li { flex: 1 1 300px; min-width: 1px; }
  • 10. If the value of flex-grow is 0 the boxes cannot grow. .wrapper { display: flex; } .wrapper li { flex: 0 1 300px; min-width: 1px; }
  • 11. If the value of flex-shrink is 0 the boxes cannot shrink. .wrapper { display: flex; } .wrapper li { flex: 1 0 300px; min-width: 1px; }
  • 12. Setting flex-grow to 2 on the 3 item. .wrapper li { flex: 1 1 300px; min-width: 1px; } .wrapper li:nth-child(3) { flex-grow: 2; }
  • 13. With flex-basis 0 all the available space is up for grabs and can be assigned according to the flex-grow value. .wrapper li { flex: 1 1 0; min-width: 1px; } .wrapper li:nth-child(3) { flex-grow: 2; }
  • 15. The wonderful world of ‘auto’
  • 16. https://drafts.csswg.org/css-flexbox/#valdef-flex-basis-auto “When specified on a flex item, the auto keyword retrieves the value of the main size property as the used flex-basis. If that value is itself auto, then the used value is content.”
  • 17. The ‘main size’ For flex items: if flex-direction is row, main size is width if flex-direction is column, main size is height
  • 18. flex-basis: auto If the item has a main size then it will be used for the flex-basis value. Otherwise, flex-basis is set to ‘content’.
  • 19. The flex-basis for the items inside wrapper is auto. The items have no main size and so the defaults to content. .box { width: 600px; } .wrapper { display: flex; } .wrapper > div { flex: 1 1 auto; } flex-basis: auto
  • 20. I don’t need to change my CSS for the flex-basis to respect the component width. .box { width: 600px; } .wrapper { display: flex; } .wrapper > div { flex: 1 1 auto; } flex-basis: auto 600px
  • 21. I want this bar aligned to the bottom
  • 22. Making each card a flex container means we can use flexbox for the alignment. /* the wrapper */ .inner { display: flex; } /* the cards */ .card { flex: 1 1 0; display: flex; flex-direction: column; } /* the stretching content */ .content { flex: 1 1 auto; }
  • 23.
  • 24.
  • 25. flex: 1 1 300px; flex-grow: 1 flex-shrink: 1; flex-basis: 300px; If we allow the flex items to wrap we can see how flex-basis works by dragging the window smaller. .wrapper { display: flex; flex-flow: row wrap; } .wrapper li { flex: 1 1 300px; min-width: 1px; }
  • 26.
  • 27. flex: 1 1 300px; flex-grow: 1; flex-shrink: 1; flex-basis: 300px; The 3rd item has flex: 0 1 300px; so cannot grow. .wrapper { display: flex; } .wrapper li { flex: 1 1 300px; min-width: 1px; } .wrapper li:nth-child(3) { flex: 0 1 300px; }
  • 28.
  • 30. I am creating three grid column tracks, all 1fr in width. This gives me three equally sized column tracks. .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  • 31. If I create the first column as 600 pixels and then have two 1fr columns the 600 pixel track is removed from the available space and the remainder is distributed equally between the two columns. .wrapper { display: grid; grid-template-columns: 600px 1fr 1fr; }
  • 32. With a 600 pixel column, a 1fr and a 3fr column. The 600 pixels is removed from the available space then the remaining space is divided by 4. The 1fr column gets 25% and the 3fr column 75%. .wrapper { display: grid; grid-template-columns: 600px 1fr 3fr; }
  • 33.
  • 34. Flexbox for 1 dimensional layout. CSS Grid is for 2 dimensional layout.
  • 35.
  • 36. repeat notation. These two track listings are the same. .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; } .wrapper { display: grid; grid-template-columns: repeat(4, 1fr); }
  • 37. minmax() Declare a minimum and a maximum size for tracks. .wrapper { display: grid; grid-auto-rows: minmax(200px, 400px); }
  • 38. The value of the grid-template- columns property says: repeat this track listing, auto-filing as many columns with a minimum width of 300 pixels and a maximum of 1fr. .wrapper { display: grid; grid-template-columns: 
 repeat(auto-fill, minmax(300px, 1fr)); }
  • 39.
  • 41. My grid auto-fills columns with a minimum width of 80px and a maximum width of 1fr. The rows will also use minmax() to by at least 80px tall. .colors { display: grid; grid-template-columns: repeat(auto-fill,minmax(80px, 1fr)); grid-gap: 2px; grid-auto-rows: minmax(80px, auto); }
  • 42.
  • 43. Some items span 2 column tracks. Some span 3 column tracks. Some blocks are tall and span 4 row tracks. .span2 { grid-column-end: span 2; grid-row-end: span 2; } .span3 { grid-column-end: span 3; grid-row-end: span 3; } .tall4 { grid-row-end: span 4; }
  • 44.
  • 45. The grid-auto- flow property can be set to dense. This enables a dense ‘packing mode’. .colors { display: grid; grid-template-columns: repeat(auto- fill,minmax(80px, 1fr)); grid-gap: 2px; grid-auto-rows: minmax(80px, auto); grid-auto-flow: dense; }
  • 46.
  • 47. Any items with a position on the grid are placed before auto- placed items. .white { grid-column: 1 / -1; grid-row: 3; } .black { grid-column: 1 / -1; grid-row: 6; }
  • 49. I have created a grid on my wrapper element. The grid has 3 equal width columns. Rows will be created as required as we position items into them. .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  • 50. The class ‘wrapper’ is on a ul element. <ul class="wrapper"> <li class="one"> <h3>1.</h3> </li> <li class="two"> <h3>2.</h3> </li> <li class="three"> <h3>3.</h3> </li> <li class="four"> <h3>4.</h3> </li> <li class="five"> <h3>5.</h3> </li> </ul>
  • 51.
  • 52. I am positioning my elements using CSS Grid Layout line-based positioning. Setting a column and a row line using the grid- column and grid- row properties. .one { grid-column: 1 / 3; grid-row: 2 / 4; } .two { grid-column: 3; grid-row: 1 / 3; } .three { grid-column: 3; grid-row: 3; } .four { grid-column: 1; grid-row: 1 / 3; } .five { grid-column: 2 / 4; grid-row: 1 ; }
  • 53.
  • 55. CSS Box Alignment Module Level 3 “This module contains the features of CSS relating to the alignment of boxes within their containers in the various CSS box layout models: block layout, table layout, flex layout, and grid layout.” - https://drafts.csswg.org/css-align/
  • 56. It’s 2016. We can now centre things.
  • 57. Box Alignment Properties - justify-content - align-content - justify-self - align-self - justify-items - align-items
  • 58. The justify- content property is set to space- between. The items at each end are placed against the container and the remaining space distributed evenly. nav ul{ display: flex; justify-content: space-between; flex-direction: row; }
  • 59. The justify- content property is set to space- around. The items are evenly distributed in the container with a half size space at each end. nav ul{ display: flex; justify-content: space-around; flex-direction: row; }
  • 60. If there is space in the grid container after all column and row tracks have been added. Use space-around and space- between to space the tracks. .wrapper { width: 500px; height: 400px; display: grid; grid-gap: 10px; grid-template-columns: repeat(4, 80px); grid-template-rows: repeat(3,100px); align-content: space-around; justify-content: space-between; }
  • 61. The value of align- items is stretch by default. If I add extra text in one navigation point the others all take the same height. nav ul{ display: flex; justify-content: space-around; flex-direction: row; align-items: stretch; }
  • 62. If I set the value of align-items to center then we get vertical centring. nav ul{ display: flex; justify-content: space-around; flex-direction: row; align-items: center; }
  • 63. My grid has an absolute width and height. This is larger than required for the tracks. .wrapper { width: 500px; height: 400px; display: grid; grid-gap: 10px; grid-template-columns: repeat(4, 80px); grid-template-rows: repeat(3,100px); }
  • 64. The align-content property controls the block axis. This axis aligns the grid rows. .wrapper { width: 500px; height: 400px; display: grid; grid-gap: 10px; grid-template-columns: repeat(4, 80px); grid-template-rows: repeat(3,100px); align-content: end; }
  • 65. The justify- content property controls the inline axis. This axis aligns the grid columns. .wrapper { width: 500px; height: 400px; display: grid; grid-gap: 10px; grid-template-columns: repeat(4, 80px); grid-template-rows: repeat(3,100px); align-content: end; justify-content: center; }
  • 66. I can create this same layout with flexbox or Grid. With flexbox the items are laid out in a row. .wrapper { display: flex; } .wrapper li { flex: 1 0 25%; }
  • 67. The first item is at the default stretch and as the tallest item is dictating the height of the flex container. The second is entered in the container. The third aligned to the start. The fourth aligned to the end. .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; }
  • 68. For Grid I use a single row, 4 column Grid. .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; }
  • 69. Grid alignment properties for the three landscape images. .wrapper li:nth-child(2) { align-self: center; } .wrapper li:nth-child(3) { align-self: start; } .wrapper li:nth-child(4) { align-self: end; }
  • 71.
  • 73. Aligning the grid. body { height: 100vh; display: grid; grid-template-columns: 80%; align-content: center; justify-content: center; }
  • 75. 1fr 1fr 1fr 1fr 1fr 2fr 2fr .login > div .login > div .login > div.actions
  • 76. Setting align- items to centre lines the fields and labels up on their centre line. .login > div { display: grid; grid-template-columns: 1fr 2fr; align-items: center; } .login > div.actions { grid-template-columns: 1fr 1fr 1fr; }
  • 78.
  • 79.
  • 80.
  • 81. Using the minmax() function with grid-auto-rows. .home-hero { display: grid; grid-gap: 1px; grid-auto-rows: minmax(150px, auto); }
  • 82. An item on the grid can become a grid or flex container itself. In this case I am using flexbox and auto margins to push my content to the bottom of the box. .special { display: flex; flex-direction: column; } .special h3{ margin-top: auto; }
  • 83.
  • 84. But, what about old browsers?!
  • 88. Say hello to Feature Queries.
  • 89. I have set three classes to display: none; .has-flex, .has-grid, .has-grid-shapes { display: none; }
  • 90. My @supports rule tests for support of the display property with a value of flex. If it is supported we show the div. @supports (display: flex) { .has-flex { display: block; } }
  • 91. My @supports rule tests for support of the display property with a value of grid. If it is supported we show the div. @supports (display: grid) { .has-grid { display: block; } }
  • 92. My @supports rule tests for support of the display property with a value of grid AND shape- outside:circle. If it is supported we show the div. @supports (display: grid) and (shape-outside:circle()) { .has-grid-shapes { display: block; } }
  • 94.
  • 95. Defaults for all browsers will be loaded by even really old browsers. body { padding-top: 20%; } h1, .login, .account, .contact{ width:80%; margin: 0 auto; }
  • 96.
  • 97. Within a Feature Query we add some information for flexbox supporting browsers. @supports (display: flex) { body { padding:0; height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; } h1, .login, .account, .contact { margin: 0; width: 80%; } }
  • 98.
  • 99. The Feature Query for Grid supporting browsers. @supports (display: grid) { body { display: grid; grid-template-columns: 80%; align-content: center; align-items: stretch; } @media (min-width: 650px) { body { grid-template-columns: repeat(2, minmax(150px, 30%)); } h1, .login { grid-column-end: span 2; width: auto; } .login > div { display: grid; grid-template-columns: 1fr 2fr; align-items: center; } .login > div.actions { grid-template-columns: 1fr 1fr 1fr; } .account { border-right: 1px dotted rgb(191, 216, 227); padding: 0 10px 0 0; align-self: end; width: auto; } .contact { padding: 0 0 0 10px; width: auto; } } }
  • 100. Your users ‘grow into’ enhancements as their browsers auto-update.
  • 102. Power and responsibility • Good = creating the most accessible source order and using Grid or Flexbox to get the optimal display for each device. • Bad = using Grid or Flexbox as an excuse to forget about the source. • Terrible - stripping out semantic elements to make everything a grid or flex item.
  • 103. Léonie Watson | On CSS accessibility and drinking tea | CSS Day 2016 https://vimeo.com/180566024 Also see: 
 http://tink.uk/flexbox-the-keyboard-navigation-disconnect/
  • 104. https://drafts.csswg.org/css-grid/#order-accessibility “Authors must use order and the grid- placement properties only for visual, not logical, reordering of content. Style sheets that use these features to perform logical reordering are non- conforming.”
  • 108. Why are we looking at something I can’t use yet?
  • 110. Get involved with developing specs! • While a spec is being developed your feedback is wanted and can be included in the spec. • Wait until browsers ship and you lose that chance. • It just got easier. CSS Spec issues are now on GitHub.
 http://logs.csswg.org/irc.w3.org/css/2016-05-10/#e684439
  • 111. Do a good deed for your future self.
  • 112. Thank you Slides & Resources: https://cssgrid.me/WebExpo16 http://csslayout.news - sign up for my weekly CSS Layout email — @rachelandrew | me@rachelandrew.co.uk — https://rachelandrew.co.uk | https://grabaperch.com