SlideShare a Scribd company logo
WHAT I DISCOVERED ABOUT
LAYOUT VIA CSS GRID
@rachelandrew GDE Summit 2017
Rachel Andrew
▸ @rachelandrew on Twitter
▸ https://rachelandrew.co.uk
▸ co-founder Perch and Perch Runway CMS - https://grabaperch.com
▸ Invited Expert to the CSS Working Group
▸ GDE Web Technologies
▸ Student pilot, runner, old nerd.
March 2017 March 2017 March 2017 March 2017 March 2017 October 17 2017
66.65%
It’s not CSS Vaporware!*





*I’m very happy about this
The more I know about CSS, the more
I realise I don’t know.
CSS Grid and friends
▸ CSS Display
▸ Writing Modes
▸ Logical Properties
▸ Box Alignment
▸ Feature Queries
CSS Display: https://drafts.csswg.org/css-display/
“This module describes how the CSS formatting
box tree is generated from the document
element tree and defines the display property
that controls it.”
CSS Display: https://drafts.csswg.org/css-display/
▸ The Outer Display Type - how does this box behave in relationship to its
parent?
▸ The Inner Display Type - what formatting context does it create for its child
elements?
CSS Grid: https://www.w3.org/TR/css-grid-1/#grid-item-display
“The display value of a grid item is blockified: if
the specified display of an in-flow child of an
element generating a grid container is an inline-
level value, it computes to its block-level
equivalent. ”
CSS Display: https://www.w3.org/TR/css-display/#transformations
“Some layout effects
require blockification or inlinification of the box
type, which sets the box’s outer display type, if it
is not none or contents,
to block or inline (respectively).”
<div class="grid">
<a href="">one</a>
<span>two</span>
<div>three</div>
<img src="img.png" alt="placeholder">
</div>
.grid {
display: grid;
grid-template-columns: repeat(4,200px);
grid-gap: 8px;
height: 200px;
border: 8px solid rgb(3,99,143);
}
Why is knowing this useful?
.wrapper {
max-width: 800px;
border-spacing: 20px;
}
.image {
display: table-cell;
}
.content {
display: table-cell;
vertical-align: top;
}
https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes
“Any table element will automatically generate
necessary anonymous table objects around itself,
consisting of at least three nested objects
corresponding to a 'table'/'inline-table' element, a
'table-row' element, and a 'table-cell' element.”
CSS Grid: https://www.w3.org/TR/css-grid-1/#grid-item-display
“Note: Some values of display normally trigger the
creation of anonymous boxes around the original
box. If such a box is a grid item, it is blockified first,
and so anonymous box creation will not happen.
For example, two contiguous grid
items with display: table-cell will become two
separate display: block grid items, instead of being
wrapped into a single anonymous table.”
.wrapper {
max-width: 800px;
border-spacing: 20px;
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 20px;
}
.image {
display: table-cell;
}
.content {
display: table-cell;
vertical-align: top;
}
https://codepen.io/rachelandrew/pen/KqMyzN
.grid {
max-width: 800px;
border-spacing: 20px;
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 20px;
}
@supports (grid-gap: 20px) {
.grid {
margin: 20px;
}
}
.image {
display: table-cell;
}
.content {
display: table-cell;
vertical-align: top;
}
https://codepen.io/rachelandrew/pen/qjNVwG
Creating fallbacks
▸ You do not need to write two sets of code
▸ Write your fallback code and then write your grid code
▸ In many cases the spec has you covered
▸ Use Feature Queries to isolate things that would apply to both grid-supporting
and non-supporting browsers
https://rachelandrew.co.uk/css/cheatsheets/grid-fallbacks
What happened to subgrid?
Google Developers Experts Summit 2017 - CSS Layout
.grid {
display: grid;
max-width: 960px;
margin: 0 auto;
grid-template-columns: repeat(3, 1fr);
grid-gap: 20px;
}
CSS Grid
Creating a three column layout with
CSS Grid.
https://codepen.io/rachelandrew/pen/XgdydE
Google Developers Experts Summit 2017 - CSS Layout
.card {
display: flex;
flex-direction: column;
}
.card .inner {
flex: 1;
}
Make the card a flex item
Allow the inner to grow, it pushes the
footer down to the bottom of the
card.s
https://codepen.io/rachelandrew/pen/XgdydE
Google Developers Experts Summit 2017 - CSS Layout
1
2
3
4
5
.card {
border: 4px solid rgb(24,154,153);
background-color: #fff;
grid-row: auto / span 4;
display: subgrid;
}
display: subgrid
The card is a direct child of the grid
so needs to span four rows of the grid
to make room for the four rows in the
subgridded internals.



display: subgrid means the card now
uses the tracks of the parent grid.
Google Developers Experts Summit 2017 - CSS Layout
Subgrid links and thoughts
▸ https://rachelandrew.co.uk/archives/2017/03/16/subgrid-moved-to-level-2-
of-the-css-grid-specification/
▸ https://github.com/w3c/csswg-drafts/issues/958
▸ https://github.com/rachelandrew/cssgrid-ama/issues/13
▸ http://meyerweb.com/eric/thoughts/2016/01/15/subgrids-considered-
essential/
Vanishing boxes with display:contents
display: contents https://drafts.csswg.org/css-display/#box-generation
“The element itself does not generate any boxes,
but its children and pseudo-elements still
generate boxes as normal. For the purposes of
box generation and layout, the element must be
treated as if it had been replaced in the element
tree by its contents”
<div class="flex">
<div>One</div>
<div>Two</div>
<div class="nested">
<div>Nested One</div>
<div>Nested Two</div>
</div>
</div>
<div class="grid">
<div>One</div>
<div>Two</div>
<div class="nested">
<div>Nested One</div>
<div>Nested Two</div>
</div>
</div>
https://codepen.io/rachelandrew/pen/GEZPex
.flex {
display: flex;
border: 8px solid rgb(3,99,143);
}
.flex > * {
flex: 1;
border: 8px solid rgb(24,154,153);
}
.grid {
display: grid;
border: 8px solid rgb(3,99,143);
grid-template-columns:
repeat(4,minmax(200px, 1fr));
grid-gap: 8px;
}
.grid > * {
border: 8px solid rgb(24,154,153);
}
https://codepen.io/rachelandrew/pen/GEZPex
.nested {
display: contents;
}
https://codepen.io/rachelandrew/pen/GEZPex
Needs Firefox or Chrome Canary
.flex > * {
flex: 1;
border: 8px solid rgb(24,154,153);
}
.grid > * {
border: 8px solid rgb(24,154,153);
}
Google Developers Experts Summit 2017 - CSS Layout
.card {
border: 4px solid rgb(24,154,153);
background-color: #fff;
display: contents;
}
display: contents
We add this to the direct child of the
grid container.
https://codepen.io/rachelandrew/pen/QgNJYa
Google Developers Experts Summit 2017 - CSS Layout
1
2
3
4
5
.card {
border: 4px solid rgb(24,154,153);
background-color: #fff;
grid-row: auto / span 4;
display: contents;
}
Make room for the rows
Each card needs four rows.
.card:nth-child(1) h2{ grid-column: 1; grid-row: 1; }
.card:nth-child(1) img{ grid-column: 1; grid-row: 2; }
.card:nth-child(1) .inner{ grid-column: 1; grid-row: 3; }
.card:nth-child(1) footer{ grid-column: 1; grid-row: 4; }
.card:nth-child(2) h2{ grid-column: 2; grid-row: 1; }
.card:nth-child(2) img{ grid-column: 2; grid-row: 2; }
.card:nth-child(2) .inner{ grid-column: 2; grid-row: 3; }
.card:nth-child(2) footer{ grid-column: 2; grid-row: 4; }
.card:nth-child(3) h2{ grid-column: 3; grid-row: 1; }
.card:nth-child(3) img{ grid-column: 3; grid-row: 2; }
.card:nth-child(3) .inner{ grid-column: 3; grid-row: 3; }
.card:nth-child(3) footer{ grid-column: 3; grid-row: 4; }
.card:nth-child(4) h2{ grid-column: 1; grid-row: 5; }
.card:nth-child(4) img{ grid-column: 1; grid-row: 6; }
.card:nth-child(4) .inner{ grid-column: 1; grid-row: 7;}
.card:nth-child(4) footer{ grid-column: 1; grid-row: 8; }
.card:nth-child(5) h2{ grid-column: 2; grid-row: 5; }
.card:nth-child(5) img{ grid-column: 2; grid-row: 6; }
.card:nth-child(5) .inner{ grid-column: 2; grid-row: 7; }
.card:nth-child(5) footer{ grid-column: 2; grid-row: 8; }
.card:nth-child(6) h2{ grid-column: 3; grid-row: 5; }
.card:nth-child(6) img{ grid-column: 3; grid-row: 6; }
.card:nth-child(6) .inner{ grid-column: 3; grid-row: 7; }
.card:nth-child(6) footer{ grid-column: 3; grid-row: 8; }
Ugh.
Don’t do this.
https://codepen.io/rachelandrew/pen/QgNJYa
Google Developers Experts Summit 2017 - CSS Layout
display: contents
▸ Use when the element you are removing has no box styling (e.g. backgrounds
and borders) attached
▸ Current browser support Firefox, Chrome Canary
It is all logical.
/* this shorthand */
.a {
grid-area: 1 / 2 / 2 / 5;
}
/* is the same as this */
.a {
grid-row-start: 1;
grid-column-start: 2;
grid-row-end: 2;
grid-column-end: 5;
}
The order of values in grid-area
•row-start
•column-start
•row-end
•column-end
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 150px);
grid-template-rows: repeat(3, 100px);
}
.a {
grid-area: 1 / 2 / 2 / 5;
}
.b {
grid-area: 1 / 1 / 3 / 4;
}
https://codepen.io/rachelandrew/pen/BZKbaN
.grid {
Direction: rtl;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 150px);
grid-template-rows: repeat(3, 100px);
}
.a {
grid-area: 1 / 2 / 2 / 5;
}
.b {
grid-area: 1 / 1 / 3 / 4;
}
https://codepen.io/rachelandrew/pen/BZKbaN
CSS Logical Properties
“This module introduces logical properties and
values that provide the author with the ability to
control layout through logical, rather than physical,
direction and dimension mappings. The module
defines logical properties and values for the
features defined in CSS2.1. These properties are
writing-mode relative equivalents of their
corresponding physical properties.”
Logical not Physical
▸ The start of a page rather than the top
▸ The end of a block rather than the right
▸ In grid layout we have start and end for both columns and rows, rather than
referring to the top and bottom of columns and left and right of rows
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(3,
150px);
grid-template-rows: repeat(3, 100px);
justify-content: end;
align-content: end;
}
https://codepen.io/rachelandrew/pen/pwyBpG
End
End
Start
Start
direction: ltr
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(3,
150px);
grid-template-rows: repeat(3, 100px);
justify-content: end;
align-content: end;
}
https://codepen.io/rachelandrew/pen/pwyBpG
End
End
Start
Start
direction: rtl
https://rachelandrew.co.uk/css/cheatsheets/box-alignment
What’s in a name?
https://cloudfour.com/thinks/breaking-out-with-css-grid-layout/
.Prose {
display: grid;
grid-template-columns:
[full-start] minmax(1em, 1fr)
[main-start] minmax(0, 40em) [main-end]
minmax(1em, 1fr) [full-end];
}
.Prose > * {
grid-column: main;
}
.Prose-splash {
grid-column: full;
}
Just do this!
Magic occurs.
Google Developers Experts Summit 2017 - CSS Layout
<div class="grid">
<div>Content</div>
<div class="gallery">Full width
content</div>
<div>Content</div>
</div>
My markup
A div containing three direct child
elements, one with a class of ‘gallery’.
That’s our full width content.
.grid {
display: grid;
grid-template-columns:
minmax(1em, 1fr)
minmax(0, 660px)
minmax(1em, 1fr);
}
.grid > * {
grid-column: 2 ;
}
.grid > .gallery {
grid-column: 1 / -1 ;
}
A grid with 3 column tracks
Using the line numbers to place our
content and full width items.
https://codepen.io/rachelandrew/pen/mwOmJW
1 2 3 4
1 2 3 4
grid-column: 2;
grid-column: 1 / 4;
grid-column: 2;
Google Developers Experts Summit 2017 - CSS Layout
.grid {
display: grid;
grid-template-columns:
[full-start] minmax(1em, 1fr)
[main-start] minmax(0, 660px)
[main-end] minmax(1em, 1fr)
[full-end];
}
.grid > * {
grid-column: main-start;
}
.grid > .gallery {
grid-column: full-start / full-end;
}
Naming lines on the grid
We can now position the items using
their line names.
https://codepen.io/rachelandrew/pen/EXjrJM
full-start main-start main-end full-end
grid-column: main-start;
grid-column: full-start / full-end;
full-start main-start main-end full-end
grid-column: main-start;
grid-column: main;
grid-column: full;
full-start main-start main-end full-end
grid-column: main;
.grid {
display: grid;
max-width: 960px;
margin: 0 auto;
grid-template-columns: [full-start]
minmax(1em, 1fr)
[main-start] minmax(0, 660px) [main-end]
minmax(1em, 1fr) [full-end];
}
.grid > * {
grid-column: main;
}
.grid > .gallery {
grid-column: full;
}
‘main’ and ‘full’
These line names don’t exist
anywhere in our grid definition.
https://www.w3.org/TR/css-grid-1/#implicit-named-areas
“Since a named grid area is referenced by the
implicit named lines it produces, explicitly adding
named lines of the same form (foo-start/foo-end)
effectively creates a named grid area. ”
main-start
main-start
main-end
main-end
main
.grid {
display: grid;
grid-gap: 20px;
grid-template-columns:
100px [main-start]
100px 100px 100px [main-end]
100px 100px;
grid-template-rows:
100px [main-start]
100px 100px [main-end] 100px;
}
.item {
grid-area: main;
}
Implicit named areas
Created by having named lines using
an ident with *-start and *-end.
https://codepen.io/rachelandrew/pen/EXNmvj
.grid {
display: grid;
grid-template-columns: [full-start]
minmax(1em, 1fr)
[main-start] minmax(0, 660px) [main-
end]
minmax(1em, 1fr) [full-end];
grid-template-rows: auto auto [full-
start] auto [full-end];
}
.grid > * {
grid-column: main-start;
}
.grid > .gallery {
grid-area: full;
}
Magic named area
We have defined lines named full-
start and full-end for rows and
columns so we have an area named
full.
https://codepen.io/rachelandrew/pen/jwPjWK
https://www.w3.org/TR/css-grid-1/#line-placement
“Note: Named grid areas automatically generate
implicit named lines of this form, so specifying
grid-row-start: foo will choose the start edge of
that named grid area (unless another line named
foo-start was explicitly specified before it).”
Named lines create a named area
which in turn can be used as
named lines.
https://www.w3.org/TR/css-grid-1/#placement-shorthands
“[when using grid-row and grid-column
shorthands] … When the second value is omitted,
if the first value is a <custom-ident>, the grid-row-
end/grid-column-end longhand is also set to
that <custom-ident>; otherwise, it is set to auto.”
grid-column: main;
grid-column: full;
full-start main-start main-end full-end
grid-column: main;
grid-column: main / main;
grid-column: full / full;
full-start main-start main-end full-end
grid-column: main / main;
full fullmain main
.grid {
display: grid;
max-width: 960px;
margin: 0 auto;
grid-template-columns: [full-start]
minmax(1em, 1fr)
[main-start] minmax(0, 660px) [main-end]
minmax(1em, 1fr) [full-end];
}
.grid > * {
grid-column: main;
}
.grid > .gallery {
grid-column: full;
}
Targeting the column track
The line name ‘main’ is created from
the named area created by our
named lines.
https://codepen.io/rachelandrew/pen/owXKMd
Google Developers Experts Summit 2017 - CSS Layout
.grid {
display: grid;
grid-template-columns: [full-start panel1-start]
1fr 1fr [content-start] 1fr 1fr 1fr 1fr [panel1-
end panel2-start ] 1fr 1fr 1fr 1fr [content-end]
1fr 1fr [panel2-end full-end] ;
}
.grid > * {
grid-column: content;
}
.grid > .gallery {
grid-column: full;
}
.grid > .panel1 {
grid-column: panel1;
padding: 4px;
}
.grid > .panel2 {
grid-column: panel2;
padding: 4px;
}
Extending the example
Adding named areas panel1 and
panel2.
https://codepen.io/rachelandrew/pen/YQXmJJ/
.grid {
display: grid;
grid-template-columns: minmax(1em,
1fr) minmax(0, 660px) minmax(1em, 1fr);
grid-template-areas:
". title ."
". content-top ."
"full-width full-width full-width"
". content-bottom ."
}
h1 { grid-area: title; }
.content1 { grid-area: content-top; }
.content2 { grid-area: content-bottom; }
.gallery { grid-area: full-width; }
Magic Grid Lines
If you have a named area you get grid
lines named *-start and *-end for rows
and columns.
https://codepen.io/rachelandrew/pen/qjdzwR
Google Developers Experts Summit 2017 - CSS Layout
.grid {
display: grid;
grid-template-columns: minmax(1em,
1fr) minmax(0, 660px) minmax(1em, 1fr);
grid-template-areas:
". title ."
". content-top ."
"full-width full-width full-width"
". content-bottom ."
}
h1 { grid-area: title; }
.content1 { grid-area: content-top; }
.content2 { grid-area: content-bottom; }
.gallery { grid-area: full-width; }
Magic Grid Lines
Each grid-area creates a set of lines
for the start and end of the area -
rows and columns.
For title, we have title-start and title-
end for rows and columns.
https://codepen.io/rachelandrew/pen/qjdzwR
.grid::after {
content: "";
background-color: #fff;
border: 4px solid rgb(182,222,211);
grid-column:
content-top-start / content-top-end;
grid-row:
title-start / content-bottom-end;
z-index: -1;
}
Magic Lines
Positioning some generated content
using the magical lines.
https://codepen.io/rachelandrew/pen/qjdzwR
Google Developers Experts Summit 2017 - CSS Layout
Things appearing 

in unexpected places.
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: 100px [main-start]
100px 100px [main-end];
}
.a {
grid-column: 1 / 3;
grid-row: 1;
}
.b {
grid-column: 3;
grid-row: 1 / 3;
}
.c {
grid-column: 1;
}
.d {
grid-column: 2;
grid-row: 2;
}
https://codepen.io/rachelandrew/pen/JJYxve/
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: 100px [main-
start] 100px 100px [main-end];
}
.e {
grid-area: main;
}
https://codepen.io/rachelandrew/pen/JJYxve/
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: 100px [main-
start] 100px 100px [main-end];
}
.e {
grid-area: auto/ main;
}
https://codepen.io/rachelandrew/pen/JJYxve/
So many possibilities.
Find out more
I made you some resources
Visit Grid by Example for worked examples, patterns with
fallbacks, and a free video tutorial:

gridbyexample.com
I created a huge set of guides for MDN: 

https://developer.mozilla.org/en-US/docs/Web/CSS/
CSS_Grid_Layout
Over 4 years of grid thoughts on my site at:

https://rachelandrew.co.uk/archives/tag/cssgrid
CSS Grid AMA:

https://github.com/rachelandrew/cssgrid-ama 

The New CSS Layout
October 10th 2017
THANK YOU!
@rachelandrew



Resources & code: https://rachelandrew.co.uk/speaking/event/gde-summit-2017

More Related Content

What's hot (12)

Theme
ThemeTheme
Theme
guest4c338112
 
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power StackRails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
David Copeland
 
The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210
Mahmoud Samir Fayed
 
zynga-online.facebook.html
zynga-online.facebook.htmlzynga-online.facebook.html
zynga-online.facebook.html
admin999
 
Braces to Pixels - CSS Day 2016
Braces to Pixels - CSS Day 2016Braces to Pixels - CSS Day 2016
Braces to Pixels - CSS Day 2016
Greg Whitworth
 
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation PipelinesMongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB
 
Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop
Shay Howe
 
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
Sencha
 
The Ring programming language version 1.10 book - Part 53 of 212
The Ring programming language version 1.10 book - Part 53 of 212The Ring programming language version 1.10 book - Part 53 of 212
The Ring programming language version 1.10 book - Part 53 of 212
Mahmoud Samir Fayed
 
How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
vathur
 
HTML5 - Pedro Rosa
HTML5 - Pedro RosaHTML5 - Pedro Rosa
HTML5 - Pedro Rosa
Comunidade NetPonto
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
Tim Wright
 
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power StackRails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
David Copeland
 
The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210
Mahmoud Samir Fayed
 
zynga-online.facebook.html
zynga-online.facebook.htmlzynga-online.facebook.html
zynga-online.facebook.html
admin999
 
Braces to Pixels - CSS Day 2016
Braces to Pixels - CSS Day 2016Braces to Pixels - CSS Day 2016
Braces to Pixels - CSS Day 2016
Greg Whitworth
 
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation PipelinesMongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB
 
Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop
Shay Howe
 
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
Sencha
 
The Ring programming language version 1.10 book - Part 53 of 212
The Ring programming language version 1.10 book - Part 53 of 212The Ring programming language version 1.10 book - Part 53 of 212
The Ring programming language version 1.10 book - Part 53 of 212
Mahmoud Samir Fayed
 
How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
vathur
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
Tim Wright
 

Similar to Google Developers Experts Summit 2017 - CSS Layout (20)

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
 
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
 
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
 
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 - 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
 
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
 
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
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
Rachel Andrew
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
Rachel Andrew
 
CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016
Rachel Andrew
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NE
Rachel Andrew
 
Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid 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
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
All Things Open
 
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
 
Evergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersEvergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsers
Rachel Andrew
 
CSS Grid for html5j
CSS Grid for html5jCSS Grid for html5j
CSS Grid for html5j
Rachel Andrew
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid Layout
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
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
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
 
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
 
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
 
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 - 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
 
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
 
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
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
Rachel Andrew
 
CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016
Rachel Andrew
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NE
Rachel Andrew
 
Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid 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
 
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
 
Evergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersEvergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsers
Rachel Andrew
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid Layout
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
 

More from Rachel Andrew (19)

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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
Render Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout TodayRender Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout Today
Rachel Andrew
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and Flexbox
Rachel Andrew
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
Render Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout TodayRender Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout Today
Rachel Andrew
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and Flexbox
Rachel Andrew
 
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
 

Recently uploaded (20)

European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCPMCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
Sambhav Kothari
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
Ivan Ruchkin
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
katalinjordans2
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
What’s New in Web3 Development Trends to Watch in 2025.pptx
What’s New in Web3 Development Trends to Watch in 2025.pptxWhat’s New in Web3 Development Trends to Watch in 2025.pptx
What’s New in Web3 Development Trends to Watch in 2025.pptx
Lisa ward
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCPMCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
Sambhav Kothari
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
Ivan Ruchkin
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
katalinjordans2
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
What’s New in Web3 Development Trends to Watch in 2025.pptx
What’s New in Web3 Development Trends to Watch in 2025.pptxWhat’s New in Web3 Development Trends to Watch in 2025.pptx
What’s New in Web3 Development Trends to Watch in 2025.pptx
Lisa ward
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 

Google Developers Experts Summit 2017 - CSS Layout

  • 1. WHAT I DISCOVERED ABOUT LAYOUT VIA CSS GRID @rachelandrew GDE Summit 2017
  • 2. Rachel Andrew ▸ @rachelandrew on Twitter ▸ https://rachelandrew.co.uk ▸ co-founder Perch and Perch Runway CMS - https://grabaperch.com ▸ Invited Expert to the CSS Working Group ▸ GDE Web Technologies ▸ Student pilot, runner, old nerd.
  • 3. March 2017 March 2017 March 2017 March 2017 March 2017 October 17 2017
  • 5. It’s not CSS Vaporware!*
 
 
 *I’m very happy about this
  • 6. The more I know about CSS, the more I realise I don’t know.
  • 7. CSS Grid and friends ▸ CSS Display ▸ Writing Modes ▸ Logical Properties ▸ Box Alignment ▸ Feature Queries
  • 8. CSS Display: https://drafts.csswg.org/css-display/ “This module describes how the CSS formatting box tree is generated from the document element tree and defines the display property that controls it.”
  • 9. CSS Display: https://drafts.csswg.org/css-display/ ▸ The Outer Display Type - how does this box behave in relationship to its parent? ▸ The Inner Display Type - what formatting context does it create for its child elements?
  • 10. CSS Grid: https://www.w3.org/TR/css-grid-1/#grid-item-display “The display value of a grid item is blockified: if the specified display of an in-flow child of an element generating a grid container is an inline- level value, it computes to its block-level equivalent. ”
  • 11. CSS Display: https://www.w3.org/TR/css-display/#transformations “Some layout effects require blockification or inlinification of the box type, which sets the box’s outer display type, if it is not none or contents, to block or inline (respectively).”
  • 13. .grid { display: grid; grid-template-columns: repeat(4,200px); grid-gap: 8px; height: 200px; border: 8px solid rgb(3,99,143); }
  • 14. Why is knowing this useful?
  • 15. .wrapper { max-width: 800px; border-spacing: 20px; } .image { display: table-cell; } .content { display: table-cell; vertical-align: top; }
  • 16. https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes “Any table element will automatically generate necessary anonymous table objects around itself, consisting of at least three nested objects corresponding to a 'table'/'inline-table' element, a 'table-row' element, and a 'table-cell' element.”
  • 17. CSS Grid: https://www.w3.org/TR/css-grid-1/#grid-item-display “Note: Some values of display normally trigger the creation of anonymous boxes around the original box. If such a box is a grid item, it is blockified first, and so anonymous box creation will not happen. For example, two contiguous grid items with display: table-cell will become two separate display: block grid items, instead of being wrapped into a single anonymous table.”
  • 18. .wrapper { max-width: 800px; border-spacing: 20px; display: grid; grid-template-columns: auto 1fr; grid-gap: 20px; } .image { display: table-cell; } .content { display: table-cell; vertical-align: top; } https://codepen.io/rachelandrew/pen/KqMyzN
  • 19. .grid { max-width: 800px; border-spacing: 20px; display: grid; grid-template-columns: auto 1fr; grid-gap: 20px; } @supports (grid-gap: 20px) { .grid { margin: 20px; } } .image { display: table-cell; } .content { display: table-cell; vertical-align: top; } https://codepen.io/rachelandrew/pen/qjNVwG
  • 20. Creating fallbacks ▸ You do not need to write two sets of code ▸ Write your fallback code and then write your grid code ▸ In many cases the spec has you covered ▸ Use Feature Queries to isolate things that would apply to both grid-supporting and non-supporting browsers
  • 22. What happened to subgrid?
  • 24. .grid { display: grid; max-width: 960px; margin: 0 auto; grid-template-columns: repeat(3, 1fr); grid-gap: 20px; } CSS Grid Creating a three column layout with CSS Grid. https://codepen.io/rachelandrew/pen/XgdydE
  • 26. .card { display: flex; flex-direction: column; } .card .inner { flex: 1; } Make the card a flex item Allow the inner to grow, it pushes the footer down to the bottom of the card.s https://codepen.io/rachelandrew/pen/XgdydE
  • 29. .card { border: 4px solid rgb(24,154,153); background-color: #fff; grid-row: auto / span 4; display: subgrid; } display: subgrid The card is a direct child of the grid so needs to span four rows of the grid to make room for the four rows in the subgridded internals.
 
 display: subgrid means the card now uses the tracks of the parent grid.
  • 31. Subgrid links and thoughts ▸ https://rachelandrew.co.uk/archives/2017/03/16/subgrid-moved-to-level-2- of-the-css-grid-specification/ ▸ https://github.com/w3c/csswg-drafts/issues/958 ▸ https://github.com/rachelandrew/cssgrid-ama/issues/13 ▸ http://meyerweb.com/eric/thoughts/2016/01/15/subgrids-considered- essential/
  • 32. Vanishing boxes with display:contents
  • 33. display: contents https://drafts.csswg.org/css-display/#box-generation “The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal. For the purposes of box generation and layout, the element must be treated as if it had been replaced in the element tree by its contents”
  • 34. <div class="flex"> <div>One</div> <div>Two</div> <div class="nested"> <div>Nested One</div> <div>Nested Two</div> </div> </div> <div class="grid"> <div>One</div> <div>Two</div> <div class="nested"> <div>Nested One</div> <div>Nested Two</div> </div> </div> https://codepen.io/rachelandrew/pen/GEZPex
  • 35. .flex { display: flex; border: 8px solid rgb(3,99,143); } .flex > * { flex: 1; border: 8px solid rgb(24,154,153); } .grid { display: grid; border: 8px solid rgb(3,99,143); grid-template-columns: repeat(4,minmax(200px, 1fr)); grid-gap: 8px; } .grid > * { border: 8px solid rgb(24,154,153); } https://codepen.io/rachelandrew/pen/GEZPex
  • 37. .flex > * { flex: 1; border: 8px solid rgb(24,154,153); } .grid > * { border: 8px solid rgb(24,154,153); }
  • 39. .card { border: 4px solid rgb(24,154,153); background-color: #fff; display: contents; } display: contents We add this to the direct child of the grid container. https://codepen.io/rachelandrew/pen/QgNJYa
  • 42. .card { border: 4px solid rgb(24,154,153); background-color: #fff; grid-row: auto / span 4; display: contents; } Make room for the rows Each card needs four rows.
  • 43. .card:nth-child(1) h2{ grid-column: 1; grid-row: 1; } .card:nth-child(1) img{ grid-column: 1; grid-row: 2; } .card:nth-child(1) .inner{ grid-column: 1; grid-row: 3; } .card:nth-child(1) footer{ grid-column: 1; grid-row: 4; } .card:nth-child(2) h2{ grid-column: 2; grid-row: 1; } .card:nth-child(2) img{ grid-column: 2; grid-row: 2; } .card:nth-child(2) .inner{ grid-column: 2; grid-row: 3; } .card:nth-child(2) footer{ grid-column: 2; grid-row: 4; } .card:nth-child(3) h2{ grid-column: 3; grid-row: 1; } .card:nth-child(3) img{ grid-column: 3; grid-row: 2; } .card:nth-child(3) .inner{ grid-column: 3; grid-row: 3; } .card:nth-child(3) footer{ grid-column: 3; grid-row: 4; } .card:nth-child(4) h2{ grid-column: 1; grid-row: 5; } .card:nth-child(4) img{ grid-column: 1; grid-row: 6; } .card:nth-child(4) .inner{ grid-column: 1; grid-row: 7;} .card:nth-child(4) footer{ grid-column: 1; grid-row: 8; } .card:nth-child(5) h2{ grid-column: 2; grid-row: 5; } .card:nth-child(5) img{ grid-column: 2; grid-row: 6; } .card:nth-child(5) .inner{ grid-column: 2; grid-row: 7; } .card:nth-child(5) footer{ grid-column: 2; grid-row: 8; } .card:nth-child(6) h2{ grid-column: 3; grid-row: 5; } .card:nth-child(6) img{ grid-column: 3; grid-row: 6; } .card:nth-child(6) .inner{ grid-column: 3; grid-row: 7; } .card:nth-child(6) footer{ grid-column: 3; grid-row: 8; } Ugh. Don’t do this. https://codepen.io/rachelandrew/pen/QgNJYa
  • 45. display: contents ▸ Use when the element you are removing has no box styling (e.g. backgrounds and borders) attached ▸ Current browser support Firefox, Chrome Canary
  • 46. It is all logical.
  • 47. /* this shorthand */ .a { grid-area: 1 / 2 / 2 / 5; } /* is the same as this */ .a { grid-row-start: 1; grid-column-start: 2; grid-row-end: 2; grid-column-end: 5; } The order of values in grid-area •row-start •column-start •row-end •column-end
  • 48. .grid { display: grid; grid-gap: 10px; grid-template-columns: repeat(4, 150px); grid-template-rows: repeat(3, 100px); } .a { grid-area: 1 / 2 / 2 / 5; } .b { grid-area: 1 / 1 / 3 / 4; } https://codepen.io/rachelandrew/pen/BZKbaN
  • 49. .grid { Direction: rtl; display: grid; grid-gap: 10px; grid-template-columns: repeat(4, 150px); grid-template-rows: repeat(3, 100px); } .a { grid-area: 1 / 2 / 2 / 5; } .b { grid-area: 1 / 1 / 3 / 4; } https://codepen.io/rachelandrew/pen/BZKbaN
  • 50. CSS Logical Properties “This module introduces logical properties and values that provide the author with the ability to control layout through logical, rather than physical, direction and dimension mappings. The module defines logical properties and values for the features defined in CSS2.1. These properties are writing-mode relative equivalents of their corresponding physical properties.”
  • 51. Logical not Physical ▸ The start of a page rather than the top ▸ The end of a block rather than the right ▸ In grid layout we have start and end for both columns and rows, rather than referring to the top and bottom of columns and left and right of rows
  • 52. .grid { display: grid; grid-gap: 10px; grid-template-columns: repeat(3, 150px); grid-template-rows: repeat(3, 100px); justify-content: end; align-content: end; } https://codepen.io/rachelandrew/pen/pwyBpG End End Start Start direction: ltr
  • 53. .grid { display: grid; grid-gap: 10px; grid-template-columns: repeat(3, 150px); grid-template-rows: repeat(3, 100px); justify-content: end; align-content: end; } https://codepen.io/rachelandrew/pen/pwyBpG End End Start Start direction: rtl
  • 55. What’s in a name?
  • 57. .Prose { display: grid; grid-template-columns: [full-start] minmax(1em, 1fr) [main-start] minmax(0, 40em) [main-end] minmax(1em, 1fr) [full-end]; } .Prose > * { grid-column: main; } .Prose-splash { grid-column: full; } Just do this! Magic occurs.
  • 59. <div class="grid"> <div>Content</div> <div class="gallery">Full width content</div> <div>Content</div> </div> My markup A div containing three direct child elements, one with a class of ‘gallery’. That’s our full width content.
  • 60. .grid { display: grid; grid-template-columns: minmax(1em, 1fr) minmax(0, 660px) minmax(1em, 1fr); } .grid > * { grid-column: 2 ; } .grid > .gallery { grid-column: 1 / -1 ; } A grid with 3 column tracks Using the line numbers to place our content and full width items. https://codepen.io/rachelandrew/pen/mwOmJW
  • 61. 1 2 3 4
  • 62. 1 2 3 4 grid-column: 2; grid-column: 1 / 4; grid-column: 2;
  • 64. .grid { display: grid; grid-template-columns: [full-start] minmax(1em, 1fr) [main-start] minmax(0, 660px) [main-end] minmax(1em, 1fr) [full-end]; } .grid > * { grid-column: main-start; } .grid > .gallery { grid-column: full-start / full-end; } Naming lines on the grid We can now position the items using their line names. https://codepen.io/rachelandrew/pen/EXjrJM
  • 66. grid-column: main-start; grid-column: full-start / full-end; full-start main-start main-end full-end grid-column: main-start;
  • 67. grid-column: main; grid-column: full; full-start main-start main-end full-end grid-column: main;
  • 68. .grid { display: grid; max-width: 960px; margin: 0 auto; grid-template-columns: [full-start] minmax(1em, 1fr) [main-start] minmax(0, 660px) [main-end] minmax(1em, 1fr) [full-end]; } .grid > * { grid-column: main; } .grid > .gallery { grid-column: full; } ‘main’ and ‘full’ These line names don’t exist anywhere in our grid definition.
  • 69. https://www.w3.org/TR/css-grid-1/#implicit-named-areas “Since a named grid area is referenced by the implicit named lines it produces, explicitly adding named lines of the same form (foo-start/foo-end) effectively creates a named grid area. ”
  • 71. .grid { display: grid; grid-gap: 20px; grid-template-columns: 100px [main-start] 100px 100px 100px [main-end] 100px 100px; grid-template-rows: 100px [main-start] 100px 100px [main-end] 100px; } .item { grid-area: main; } Implicit named areas Created by having named lines using an ident with *-start and *-end. https://codepen.io/rachelandrew/pen/EXNmvj
  • 72. .grid { display: grid; grid-template-columns: [full-start] minmax(1em, 1fr) [main-start] minmax(0, 660px) [main- end] minmax(1em, 1fr) [full-end]; grid-template-rows: auto auto [full- start] auto [full-end]; } .grid > * { grid-column: main-start; } .grid > .gallery { grid-area: full; } Magic named area We have defined lines named full- start and full-end for rows and columns so we have an area named full. https://codepen.io/rachelandrew/pen/jwPjWK
  • 73. https://www.w3.org/TR/css-grid-1/#line-placement “Note: Named grid areas automatically generate implicit named lines of this form, so specifying grid-row-start: foo will choose the start edge of that named grid area (unless another line named foo-start was explicitly specified before it).”
  • 74. Named lines create a named area which in turn can be used as named lines.
  • 75. https://www.w3.org/TR/css-grid-1/#placement-shorthands “[when using grid-row and grid-column shorthands] … When the second value is omitted, if the first value is a <custom-ident>, the grid-row- end/grid-column-end longhand is also set to that <custom-ident>; otherwise, it is set to auto.”
  • 76. grid-column: main; grid-column: full; full-start main-start main-end full-end grid-column: main;
  • 77. grid-column: main / main; grid-column: full / full; full-start main-start main-end full-end grid-column: main / main; full fullmain main
  • 78. .grid { display: grid; max-width: 960px; margin: 0 auto; grid-template-columns: [full-start] minmax(1em, 1fr) [main-start] minmax(0, 660px) [main-end] minmax(1em, 1fr) [full-end]; } .grid > * { grid-column: main; } .grid > .gallery { grid-column: full; } Targeting the column track The line name ‘main’ is created from the named area created by our named lines. https://codepen.io/rachelandrew/pen/owXKMd
  • 80. .grid { display: grid; grid-template-columns: [full-start panel1-start] 1fr 1fr [content-start] 1fr 1fr 1fr 1fr [panel1- end panel2-start ] 1fr 1fr 1fr 1fr [content-end] 1fr 1fr [panel2-end full-end] ; } .grid > * { grid-column: content; } .grid > .gallery { grid-column: full; } .grid > .panel1 { grid-column: panel1; padding: 4px; } .grid > .panel2 { grid-column: panel2; padding: 4px; } Extending the example Adding named areas panel1 and panel2. https://codepen.io/rachelandrew/pen/YQXmJJ/
  • 81. .grid { display: grid; grid-template-columns: minmax(1em, 1fr) minmax(0, 660px) minmax(1em, 1fr); grid-template-areas: ". title ." ". content-top ." "full-width full-width full-width" ". content-bottom ." } h1 { grid-area: title; } .content1 { grid-area: content-top; } .content2 { grid-area: content-bottom; } .gallery { grid-area: full-width; } Magic Grid Lines If you have a named area you get grid lines named *-start and *-end for rows and columns. https://codepen.io/rachelandrew/pen/qjdzwR
  • 83. .grid { display: grid; grid-template-columns: minmax(1em, 1fr) minmax(0, 660px) minmax(1em, 1fr); grid-template-areas: ". title ." ". content-top ." "full-width full-width full-width" ". content-bottom ." } h1 { grid-area: title; } .content1 { grid-area: content-top; } .content2 { grid-area: content-bottom; } .gallery { grid-area: full-width; } Magic Grid Lines Each grid-area creates a set of lines for the start and end of the area - rows and columns. For title, we have title-start and title- end for rows and columns. https://codepen.io/rachelandrew/pen/qjdzwR
  • 84. .grid::after { content: ""; background-color: #fff; border: 4px solid rgb(182,222,211); grid-column: content-top-start / content-top-end; grid-row: title-start / content-bottom-end; z-index: -1; } Magic Lines Positioning some generated content using the magical lines. https://codepen.io/rachelandrew/pen/qjdzwR
  • 86. Things appearing 
 in unexpected places.
  • 87. .grid { display: grid; grid-gap: 10px; grid-template-columns: 100px [main-start] 100px 100px [main-end]; } .a { grid-column: 1 / 3; grid-row: 1; } .b { grid-column: 3; grid-row: 1 / 3; } .c { grid-column: 1; } .d { grid-column: 2; grid-row: 2; } https://codepen.io/rachelandrew/pen/JJYxve/
  • 88. .grid { display: grid; grid-gap: 10px; grid-template-columns: 100px [main- start] 100px 100px [main-end]; } .e { grid-area: main; } https://codepen.io/rachelandrew/pen/JJYxve/
  • 89. .grid { display: grid; grid-gap: 10px; grid-template-columns: 100px [main- start] 100px 100px [main-end]; } .e { grid-area: auto/ main; } https://codepen.io/rachelandrew/pen/JJYxve/
  • 91. Find out more I made you some resources Visit Grid by Example for worked examples, patterns with fallbacks, and a free video tutorial:
 gridbyexample.com I created a huge set of guides for MDN: 
 https://developer.mozilla.org/en-US/docs/Web/CSS/ CSS_Grid_Layout Over 4 years of grid thoughts on my site at:
 https://rachelandrew.co.uk/archives/tag/cssgrid CSS Grid AMA:
 https://github.com/rachelandrew/cssgrid-ama 

  • 92. The New CSS Layout October 10th 2017
  • 93. THANK YOU! @rachelandrew
 
 Resources & code: https://rachelandrew.co.uk/speaking/event/gde-summit-2017