SlideShare ist ein Scribd-Unternehmen logo
1 von 68
Downloaden Sie, um offline zu lesen
The New CSS Layout
Rachel Andrew, dotCSS 2015
https://www.flickr.com/photos/jbushnell/2065201895
A new system for layout
• CSS Grid Layout
• Flexbox
• Box Alignment Level 3
The new CSS for Layout
• Items in our layouts understand themselves as
part of an overall layout.
• True separation of document source order and
visual display.
• Precise control of alignment - horizontally and
vertically.
• Responsive and flexible by default.
Items in our layouts understand
themselves as part of a complete
layout.
http://alistapart.com/article/fauxcolumns
http://colintoh.com/blog/display-table-anti-hero
Flexbox
Full height columns with
flexbox, taking advantage
of default alignment values.
.wrapper {
display: flex;
}
.sidebar {
flex: 1 1 30%;
}
.content {
flex: 1 1 70%;
}
Grid Layout
Full height columns in CSS
Grid Layout.
.wrapper {
display: grid;
grid-template-columns: 30% 70%;
}
.sidebar {
grid-column: 1;
}
.content {
grid-column: 2;
}
Separation of concerns
Flexbox
The flex-direction property
can take a value of row to
display things as a row or
column to display them as
a column.
nav ul{
display: flex;
justify-content: space-between;
flex-direction: row;
}
Flexbox
The visual order can be
switched using row-
reverse or column-reverse.
nav ul{
display: flex;
justify-content: space-between;
flex-direction: row-reverse;
}
Flexbox
Adding display: flex to our
container element causes
the items to display flexibly
in a row.
.wrapper {
display: flex;
}
Flexbox
The order property means
we can change the order of
flex items using CSS.
This does not change their
source order.
li:nth-child(1) {
order: 3;
}
li:nth-child(2) {
order: 1;
}
li:nth-child(3) {
order: 4;
}
li:nth-child(4) {
order: 2;
}
Grid Layout
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;
}
Grid Layout
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.
li:nth-child(1) {
grid-column: 3 / 4 ;
grid-row: 2 / 3;
}
li:nth-child(2) {
grid-column: 1 / 2;
grid-row: 2 / 3;
}
li:nth-child(3) {
grid-column: 1 / 2;
grid-row: 1 / 2;
}
li:nth-child(4) {
grid-column: 2 / 3;
grid-row: 1 / 2;
}
The New CSS Layout - dotCSS
CSS Grid automatic placement
http://www.w3.org/TR/2015/WD-css-grid-1-20150917/#grid-auto-
flow-property
https://rachelandrew.co.uk/archives/2015/04/14/grid-layout-
automatic-placement-and-packing-modes/
The New CSS Layout - dotCSS
Grid Layout
When using automatic
placement we can create
rules for items in our
document - for example
displaying portrait and
landscape images
differently.
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: auto;
}
.landscape {
grid-column-end: span 2;
}
grid-auto-flow
The default value of grid-auto-flow is
sparse. Grid will move forward planning
items skipping cells if items do not fit .
Grid Layout
With a dense packing
mode grid will move items
out of source order to
backfill spaces.
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: auto;
grid-auto-flow: dense;
}
.landscape {
grid-column-end: span 2;
}
grid-auto-flow
With grid-auto-flow dense items are
displayed out of source order. Grid
backfills any suitable gaps.
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.
https://drafts.csswg.org/css-flexbox/#order-accessibility
Authors must use order only for visual,
not logical, reordering of content. Style
sheets that use order to perform
logical reordering are non-conforming.
Control of 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/
Vertically centre ALL THE THINGS!
Default alignment
Used by the justify-items and align-items properties.
The align-items and justify-items properties set the default align-
self and justify-self behavior of the items contained by the
element.
Flexbox
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;
}
Flexbox
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;
}
Self alignment
justify-self and align-self properties.
The justify-self and align-self properties control alignment of the
box within its containing block.
Flexbox
You can use the align-self
and justify-self properties
to target individual flex
items.
In this example I have set
the group to centre, but
the third item to stretch.
nav ul{
display: flex;
justify-content: space-around;
flex-direction: row;
align-items: center;
}
nav li:nth-child(3) {
align-self: stretch;
}
Box alignment in CSS Grid Layout
Grid Layout
Creating a grid with the
align-items property set
to centre.
All items will be centered
inside their grid area.
.wrapper {
display: grid;
align-items: center;
grid-template-columns: repeat(5, 150px 10px) 150px;
grid-template-rows: 150px 10px 150px 10px 150px 10px 150px;
}
.a {
grid-column: 1 / 4;
grid-row: 1 / 4;
}
.b {
grid-column: 5 / 8;
grid-row: 1 / 4;
}
.c {
grid-column: 1 / 4;
grid-row: 5 / 10;
}
.d {
grid-column: 5 / 8;
grid-row: 5 / 10;
}
.e {
grid-column: 9 / 12;
grid-row: 1 / 10;
}
http://gridbyexample.com/examples/#example24
Grid Layout
Creating a grid with the
justify-items property set
to centre.
All items will be centered
horizontally inside their
grid area.
.wrapper {
display: grid;
justify-items: center;
grid-template-columns: repeat(5, 150px 10px) 150px;
grid-template-rows: 150px 10px 150px 10px 150px 10px
150px;
}
.a {
grid-column: 1 / 4;
grid-row: 1 / 4;
}
.b {
grid-column: 5 / 8;
grid-row: 1 / 4;
}
.c {
grid-column: 1 / 4;
grid-row: 5 / 10;
}
.d {
grid-column: 5 / 8;
grid-row: 5 / 10;
}
.e {
grid-column: 9 / 12;
grid-row: 1 / 10;
}
http://gridbyexample.com/examples/#example25
Grid Layout
As with flexbox we can
use align-self and justify-
self to target individual
grid items.
.a {
grid-column: 1 / 4;
grid-row: 1 / 4;
align-self: stretch;
}
.b {
grid-column: 5 / 8;
grid-row: 1 / 4;
align-self: end;
}
.c {
grid-column: 1 / 4;
grid-row: 5 / 10;
align-self: start;
}
.d {
grid-column: 5 / 8;
grid-row: 5 / 10;
align-self: center;
}
.e {
grid-column: 9 / 12;
grid-row: 1 / 10;
}
http://gridbyexample.com/examples/#example26
Responsive by default
Ethan Marcotte, Fluid Grids
“… every aspect of the grid—and the
elements laid upon it—can be
expressed as a proportion relative to
its container.”
target ÷ context = result
h1 {
margin-left: 14.575%; /* 144px / 988px = 0.14575 */
width: 70.85%; /* 700px / 988px = 0.7085 */
}
Flexbox
The most simple flexbox
example demonstrates
the inherent flexibility.
The items will be
displayed as a row, with
equal space between each
item.
nav ul{
display: flex;
justify-content: space-between;
}
The flex property
• flex-grow - add space
• flex-shrink - remove space
• flex-basis - the initial size before any growing or
shrinking
https://drafts.csswg.org/css-flexbox/#flex-components
Authors are encouraged to control
flexibility using the flex shorthand rather
than with its longhand properties
directly, as the shorthand correctly
resets any unspecified components to
accommodate common uses.
Flexbox
flex: 1 1 200px;
flex-grow: 1
flex-shrink: 1;
flex-basis: 200px;
The initial width of our
box is 200 pixels,
however it can grow
larger and shrink smaller
than 200 pixels.
.boxes {
display: flex;
justify-content: space-around;
}
.box {
flex: 1 1 200px;
min-width: 1px;
}
The New CSS Layout - dotCSS
Flexbox
flex: 1 1 200px;
flex-grow: 1
flex-shrink: 1;
flex-basis: 200px;
If we allow the flex items
to wrap we can see how
flex-basis works by
dragging the window
smaller.
.boxes {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
.box {
flex: 1 1 200px;
min-width: 1px;
}
The New CSS Layout - dotCSS
Flexbox
flex: 0 1 200px;
flex-grow: 0
flex-shrink: 1;
flex-basis: 200px;
The initial width of our
box is 200 pixels, it can
shrink smaller than 200
pixels but may not get
larger.
.boxes {
display: flex;
justify-content: space-around;
}
.box {
flex: 0 1 200px;
min-width: 1px;
}
The New CSS Layout - dotCSS
Flexbox
flex: 1 1 200px;
flex-grow: 1;
flex-shrink: 1;
flex-basis: 200px;
.box3 has been set to
flex: 0 1 200px;
so cannot grow.
.boxes {
display: flex;
justify-content: space-around;
}
.box {
flex: 1 1 200px;
min-width: 1px;
}
.box3 {
flex: 0 1 200px;
}
The New CSS Layout - dotCSS
Flexbox
If we set box3 to

flex-grow: 2
This box will be assigned
twice of much of the
available free space after
we have reached the 200
pixel initial width.
.boxes {
display: flex;
justify-content: space-around;
}
.box {
flex: 1 1 200px;
min-width: 1px;
}
.box3 {
2 1 200px;
}
The New CSS Layout - dotCSS
http://madebymike.com.au/demos/flexbox-tester/
The CSS Grid Layout fr unit
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;
}
Grid Layout
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;
}
Grid Layout
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;
}
http://alistapart.com/article/holygrail
Three columns. One fixed-width
sidebar for your navigation, another
for, say, your Google Ads or your Flickr
photos—and, as in a fancy truffle, a
liquid center for the real substance.
Grid Layout
CSS Grid “Holy Grail”
using grid-template-
areas.
//css
.header { grid-area: header;}
.footer { grid-area: footer;}
.side1 { grid-area: nav;}
.side2 { grid-area: ads;}
.content { grid-area: content;}
.wrapper {
display: grid;
grid-template-columns: 300px 20px 1fr 20px 300px;
grid-template-rows: auto;
grid-template-areas:
"header header header header header"
"nav ...... content ...... ads"
"footer footer footer footer footer"
;
}
//html
<div class="wrapper">
<header class="header">This is the header</header>
<article class="content"></article>
<div class="side1"></div>
<div class="side2"></div>
<footer class="footer"></div>
</div>
The New CSS Layout - dotCSS
http://caniuse.com/#feat=flexbox
http://caniuse.com/#search=grid%20layout
CSS Grid Layout
• Early implementation in IE10, 11 and current Edge
• Implementation of most of the current spec
behind a flag in Blink
• Prefixed in Webkit Nightlies
• Partial implementation in Firefox Nightlies
• Edge have updating to current spec as ‘High
Priority’ on the backlog
http://gridbyexample.com
Thank you
Slides & Code: 

https://rachelandrew.co.uk/presentations/modern-css-layout
—
@rachelandrew
me@rachelandrew.co.uk
https://rachelandrew.co.uk
http://csslayout.news - sign up for my weekly CSS Layout email

Weitere ähnliche Inhalte

Was ist angesagt?

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 LayoutRachel 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 LayoutRachel Andrew
 
The New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceThe New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceRachel Andrew
 
CSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, LinzCSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, LinzRachel Andrew
 
Devoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid LayoutDevoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid LayoutRachel 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 TodayRachel 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 2016Rachel Andrew
 
Grids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid LayoutGrids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid LayoutSimone Lelli
 
CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutRachel Andrew
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid LayoutRachel Andrew
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutRachel 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. 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
 
Making the most of New CSS Layout
Making the most of New CSS LayoutMaking the most of New CSS Layout
Making the most of New CSS LayoutRachel 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 GridRachel 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 WorldRachel Andrew
 
CSSConf.asia - Laying out the future
CSSConf.asia - Laying out the futureCSSConf.asia - Laying out the future
CSSConf.asia - Laying out the futureRachel Andrew
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxRachel Andrew
 

Was ist angesagt? (20)

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
 
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
 
The New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceThe New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP Conference
 
CSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, LinzCSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, Linz
 
Devoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid LayoutDevoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid Layout
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
 
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
 
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
 
Grids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid LayoutGrids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid Layout
 
CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS Layout
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid Layout
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
 
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!
 
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...
 
Making the most of New CSS Layout
Making the most of New CSS LayoutMaking the most of New CSS Layout
Making the most of New CSS Layout
 
CSS Grid
CSS GridCSS Grid
CSS Grid
 
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
 
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
 
CSSConf.asia - Laying out the future
CSSConf.asia - Laying out the futureCSSConf.asia - Laying out the future
CSSConf.asia - Laying out the future
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and Flexbox
 

Andere mochten auch

Visualising Data with Code
Visualising Data with CodeVisualising Data with Code
Visualising Data with CodeRi Liu
 
Data made out of functions
Data made out of functionsData made out of functions
Data made out of functionskenbot
 
Introduction to Go programming
Introduction to Go programmingIntroduction to Go programming
Introduction to Go programmingExotel
 
Clouddock: The Universal Adapter For Cloud Storage Services
Clouddock: The Universal Adapter For Cloud Storage ServicesClouddock: The Universal Adapter For Cloud Storage Services
Clouddock: The Universal Adapter For Cloud Storage ServicesClearpreso
 
The Future of CSS Layout
The Future of CSS LayoutThe Future of CSS Layout
The Future of CSS LayoutZoe Gillenwater
 
Migration from Swing to JavaFX
Migration from Swing to JavaFXMigration from Swing to JavaFX
Migration from Swing to JavaFXYuichi Sakuraba
 
5 Common Myths that Stop People from Using an Antivirus
5 Common Myths that Stop People from Using an Antivirus5 Common Myths that Stop People from Using an Antivirus
5 Common Myths that Stop People from Using an AntivirusQuick Heal Technologies Ltd.
 
Scaling Uber
Scaling UberScaling Uber
Scaling UberC4Media
 
A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...Christian Heilmann
 
Writing Smarter Applications with Machine Learning
Writing Smarter Applications with Machine LearningWriting Smarter Applications with Machine Learning
Writing Smarter Applications with Machine LearningAnoop Thomas Mathew
 
The Future of Real-Time in Spark
The Future of Real-Time in SparkThe Future of Real-Time in Spark
The Future of Real-Time in SparkReynold Xin
 
Node.js and The Internet of Things
Node.js and The Internet of ThingsNode.js and The Internet of Things
Node.js and The Internet of ThingsLosant
 
A Beginners Guide to noSQL
A Beginners Guide to noSQLA Beginners Guide to noSQL
A Beginners Guide to noSQLMike Crabb
 
The Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The FutureThe Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The FutureArturo Pelayo
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesNed Potter
 
Flexbox - La tendencia de las cajas flexibles
Flexbox - La tendencia de las cajas flexiblesFlexbox - La tendencia de las cajas flexibles
Flexbox - La tendencia de las cajas flexiblesDiego Suarez
 
XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본
XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본
XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본XpressEngine
 

Andere mochten auch (20)

Visualising Data with Code
Visualising Data with CodeVisualising Data with Code
Visualising Data with Code
 
Data made out of functions
Data made out of functionsData made out of functions
Data made out of functions
 
Introduction to Go programming
Introduction to Go programmingIntroduction to Go programming
Introduction to Go programming
 
Clouddock: The Universal Adapter For Cloud Storage Services
Clouddock: The Universal Adapter For Cloud Storage ServicesClouddock: The Universal Adapter For Cloud Storage Services
Clouddock: The Universal Adapter For Cloud Storage Services
 
The Future of CSS Layout
The Future of CSS LayoutThe Future of CSS Layout
The Future of CSS Layout
 
Migration from Swing to JavaFX
Migration from Swing to JavaFXMigration from Swing to JavaFX
Migration from Swing to JavaFX
 
5 Common Myths that Stop People from Using an Antivirus
5 Common Myths that Stop People from Using an Antivirus5 Common Myths that Stop People from Using an Antivirus
5 Common Myths that Stop People from Using an Antivirus
 
Scaling Uber
Scaling UberScaling Uber
Scaling Uber
 
A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...
 
QA in Agile World
QA in Agile WorldQA in Agile World
QA in Agile World
 
Writing Smarter Applications with Machine Learning
Writing Smarter Applications with Machine LearningWriting Smarter Applications with Machine Learning
Writing Smarter Applications with Machine Learning
 
The Future of Real-Time in Spark
The Future of Real-Time in SparkThe Future of Real-Time in Spark
The Future of Real-Time in Spark
 
Node.js and The Internet of Things
Node.js and The Internet of ThingsNode.js and The Internet of Things
Node.js and The Internet of Things
 
A Beginners Guide to noSQL
A Beginners Guide to noSQLA Beginners Guide to noSQL
A Beginners Guide to noSQL
 
The Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The FutureThe Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The Future
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and Archives
 
Flexbox - La tendencia de las cajas flexibles
Flexbox - La tendencia de las cajas flexiblesFlexbox - La tendencia de las cajas flexibles
Flexbox - La tendencia de las cajas flexibles
 
Css grid layout
Css grid layoutCss grid layout
Css grid layout
 
XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본
XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본
XE 오픈 세미나(2014-06-28) - (1/3) 레이아웃 제작 기본
 

Ähnlich wie The New CSS Layout - dotCSS

Grid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SFGrid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SFRachel Andrew
 
Laying out the future
Laying out the futureLaying out the future
Laying out the futureRachel Andrew
 
Confoo: The New CSS Layout
Confoo: The New CSS LayoutConfoo: The New CSS Layout
Confoo: The New CSS LayoutRachel Andrew
 
Better Layouts with Flexbox + CSS Grids
Better Layouts with Flexbox + CSS GridsBetter Layouts with Flexbox + CSS Grids
Better Layouts with Flexbox + CSS GridsSamantha Provenza
 
The Right Layout Tool for the Job
The Right Layout Tool for the JobThe Right Layout Tool for the Job
The Right Layout Tool for the JobRachel 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 FreiburgRachel 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 todayRachel 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 - RuhrJSRachel Andrew
 
Evergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersEvergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersRachel Andrew
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSSBoris Paillard
 
Using Flexbox Today (Frontier Conf 2016)
Using Flexbox Today (Frontier Conf 2016)Using Flexbox Today (Frontier Conf 2016)
Using Flexbox Today (Frontier Conf 2016)Zoe Gillenwater
 
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
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSSRachel 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
 
Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)Zoe Gillenwater
 
The Grid - The Future of CSS Layout
The Grid - The Future of CSS LayoutThe Grid - The Future of CSS Layout
The Grid - The Future of CSS LayoutRonny Siikaluoma
 

Ähnlich wie The New CSS Layout - dotCSS (20)

Grid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SFGrid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SF
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
 
Confoo: The New CSS Layout
Confoo: The New CSS LayoutConfoo: The New CSS Layout
Confoo: The New CSS Layout
 
Better Layouts with Flexbox + CSS Grids
Better Layouts with Flexbox + CSS GridsBetter Layouts with Flexbox + CSS Grids
Better Layouts with Flexbox + CSS Grids
 
The Right Layout Tool for the Job
The Right Layout Tool for the JobThe Right Layout Tool for the Job
The Right Layout Tool for the Job
 
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
 
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
 
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
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSS
 
Using Flexbox Today (Frontier Conf 2016)
Using Flexbox Today (Frontier Conf 2016)Using Flexbox Today (Frontier Conf 2016)
Using Flexbox Today (Frontier Conf 2016)
 
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
 
A complete guide to flexbox
A complete guide to flexboxA complete guide to flexbox
A complete guide to flexbox
 
flexbox report
flexbox reportflexbox report
flexbox report
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
 
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!
 
Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)
 
The Grid - The Future of CSS Layout
The Grid - The Future of CSS LayoutThe Grid - The Future of CSS Layout
The Grid - The Future of CSS Layout
 
Next-level CSS
Next-level CSSNext-level CSS
Next-level CSS
 

Mehr von 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 LayoutRachel 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 LayoutRachel 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 LayoutRachel Andrew
 
Into the Weeds of CSS Layout
Into the Weeds of CSS LayoutInto the Weeds of CSS Layout
Into the Weeds of CSS LayoutRachel 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 - DevFest17Rachel 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 & FriendsRachel 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 & FriendsRachel 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 - WEBU17Rachel 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 - NordicJSRachel Andrew
 
Web Summer Camp Keynote
Web Summer Camp KeynoteWeb Summer Camp Keynote
Web Summer Camp KeynoteRachel 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 WorldRachel 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 WorldRachel Andrew
 
Perch, Patterns and Old Browsers
Perch, Patterns and Old BrowsersPerch, Patterns and Old Browsers
Perch, Patterns and Old BrowsersRachel Andrew
 
Where does CSS come from?
Where does CSS come from?Where does CSS come from?
Where does CSS come from?Rachel Andrew
 
Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid LayoutRachel Andrew
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NERachel Andrew
 

Mehr von Rachel Andrew (18)

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
 
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
 
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
 
Into the Weeds of CSS Layout
Into the Weeds of CSS LayoutInto the Weeds of CSS Layout
Into the Weeds of CSS Layout
 
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
 
Graduating to Grid
Graduating to GridGraduating to Grid
Graduating to Grid
 
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
 
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
 
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
 
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
 
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?
 
CSS Grid for html5j
CSS Grid for html5jCSS Grid for html5j
CSS Grid for html5j
 
Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid Layout
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NE
 

Kürzlich hochgeladen

Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Projectwajrcs
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdfMeon Technology
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesSoftwareMill
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Jaydeep Chhasatia
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfBrain Inventory
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfTobias Schneck
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmonyelliciumsolutionspun
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntelliSource Technologies
 
Kubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptxKubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptxPrakarsh -
 

Kürzlich hochgeladen (20)

Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdf
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retries
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
Program with GUTs
Program with GUTsProgram with GUTs
Program with GUTs
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdf
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptx
 
Kubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptxKubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptx
 

The New CSS Layout - dotCSS

  • 1. The New CSS Layout Rachel Andrew, dotCSS 2015 https://www.flickr.com/photos/jbushnell/2065201895
  • 2. A new system for layout • CSS Grid Layout • Flexbox • Box Alignment Level 3
  • 3. The new CSS for Layout • Items in our layouts understand themselves as part of an overall layout. • True separation of document source order and visual display. • Precise control of alignment - horizontally and vertically. • Responsive and flexible by default.
  • 4. Items in our layouts understand themselves as part of a complete layout.
  • 7. Flexbox Full height columns with flexbox, taking advantage of default alignment values. .wrapper { display: flex; } .sidebar { flex: 1 1 30%; } .content { flex: 1 1 70%; }
  • 8. Grid Layout Full height columns in CSS Grid Layout. .wrapper { display: grid; grid-template-columns: 30% 70%; } .sidebar { grid-column: 1; } .content { grid-column: 2; }
  • 10. Flexbox The flex-direction property can take a value of row to display things as a row or column to display them as a column. nav ul{ display: flex; justify-content: space-between; flex-direction: row; }
  • 11. Flexbox The visual order can be switched using row- reverse or column-reverse. nav ul{ display: flex; justify-content: space-between; flex-direction: row-reverse; }
  • 12. Flexbox Adding display: flex to our container element causes the items to display flexibly in a row. .wrapper { display: flex; }
  • 13. Flexbox The order property means we can change the order of flex items using CSS. This does not change their source order. li:nth-child(1) { order: 3; } li:nth-child(2) { order: 1; } li:nth-child(3) { order: 4; } li:nth-child(4) { order: 2; }
  • 14. Grid Layout 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; }
  • 15. Grid Layout 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. li:nth-child(1) { grid-column: 3 / 4 ; grid-row: 2 / 3; } li:nth-child(2) { grid-column: 1 / 2; grid-row: 2 / 3; } li:nth-child(3) { grid-column: 1 / 2; grid-row: 1 / 2; } li:nth-child(4) { grid-column: 2 / 3; grid-row: 1 / 2; }
  • 17. CSS Grid automatic placement http://www.w3.org/TR/2015/WD-css-grid-1-20150917/#grid-auto- flow-property https://rachelandrew.co.uk/archives/2015/04/14/grid-layout- automatic-placement-and-packing-modes/
  • 19. Grid Layout When using automatic placement we can create rules for items in our document - for example displaying portrait and landscape images differently. .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: auto; } .landscape { grid-column-end: span 2; }
  • 20. grid-auto-flow The default value of grid-auto-flow is sparse. Grid will move forward planning items skipping cells if items do not fit .
  • 21. Grid Layout With a dense packing mode grid will move items out of source order to backfill spaces. .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: auto; grid-auto-flow: dense; } .landscape { grid-column-end: span 2; }
  • 22. grid-auto-flow With grid-auto-flow dense items are displayed out of source order. Grid backfills any suitable gaps.
  • 23. 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.
  • 24. https://drafts.csswg.org/css-flexbox/#order-accessibility Authors must use order only for visual, not logical, reordering of content. Style sheets that use order to perform logical reordering are non-conforming.
  • 26. 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/
  • 27. Vertically centre ALL THE THINGS!
  • 28. Default alignment Used by the justify-items and align-items properties. The align-items and justify-items properties set the default align- self and justify-self behavior of the items contained by the element.
  • 29. Flexbox 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; }
  • 30. Flexbox 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; }
  • 31. Self alignment justify-self and align-self properties. The justify-self and align-self properties control alignment of the box within its containing block.
  • 32. Flexbox You can use the align-self and justify-self properties to target individual flex items. In this example I have set the group to centre, but the third item to stretch. nav ul{ display: flex; justify-content: space-around; flex-direction: row; align-items: center; } nav li:nth-child(3) { align-self: stretch; }
  • 33. Box alignment in CSS Grid Layout
  • 34. Grid Layout Creating a grid with the align-items property set to centre. All items will be centered inside their grid area. .wrapper { display: grid; align-items: center; grid-template-columns: repeat(5, 150px 10px) 150px; grid-template-rows: 150px 10px 150px 10px 150px 10px 150px; } .a { grid-column: 1 / 4; grid-row: 1 / 4; } .b { grid-column: 5 / 8; grid-row: 1 / 4; } .c { grid-column: 1 / 4; grid-row: 5 / 10; } .d { grid-column: 5 / 8; grid-row: 5 / 10; } .e { grid-column: 9 / 12; grid-row: 1 / 10; }
  • 36. Grid Layout Creating a grid with the justify-items property set to centre. All items will be centered horizontally inside their grid area. .wrapper { display: grid; justify-items: center; grid-template-columns: repeat(5, 150px 10px) 150px; grid-template-rows: 150px 10px 150px 10px 150px 10px 150px; } .a { grid-column: 1 / 4; grid-row: 1 / 4; } .b { grid-column: 5 / 8; grid-row: 1 / 4; } .c { grid-column: 1 / 4; grid-row: 5 / 10; } .d { grid-column: 5 / 8; grid-row: 5 / 10; } .e { grid-column: 9 / 12; grid-row: 1 / 10; }
  • 38. Grid Layout As with flexbox we can use align-self and justify- self to target individual grid items. .a { grid-column: 1 / 4; grid-row: 1 / 4; align-self: stretch; } .b { grid-column: 5 / 8; grid-row: 1 / 4; align-self: end; } .c { grid-column: 1 / 4; grid-row: 5 / 10; align-self: start; } .d { grid-column: 5 / 8; grid-row: 5 / 10; align-self: center; } .e { grid-column: 9 / 12; grid-row: 1 / 10; }
  • 41. Ethan Marcotte, Fluid Grids “… every aspect of the grid—and the elements laid upon it—can be expressed as a proportion relative to its container.”
  • 42. target ÷ context = result h1 { margin-left: 14.575%; /* 144px / 988px = 0.14575 */ width: 70.85%; /* 700px / 988px = 0.7085 */ }
  • 43. Flexbox The most simple flexbox example demonstrates the inherent flexibility. The items will be displayed as a row, with equal space between each item. nav ul{ display: flex; justify-content: space-between; }
  • 44. The flex property • flex-grow - add space • flex-shrink - remove space • flex-basis - the initial size before any growing or shrinking
  • 45. https://drafts.csswg.org/css-flexbox/#flex-components Authors are encouraged to control flexibility using the flex shorthand rather than with its longhand properties directly, as the shorthand correctly resets any unspecified components to accommodate common uses.
  • 46. Flexbox flex: 1 1 200px; flex-grow: 1 flex-shrink: 1; flex-basis: 200px; The initial width of our box is 200 pixels, however it can grow larger and shrink smaller than 200 pixels. .boxes { display: flex; justify-content: space-around; } .box { flex: 1 1 200px; min-width: 1px; }
  • 48. Flexbox flex: 1 1 200px; flex-grow: 1 flex-shrink: 1; flex-basis: 200px; If we allow the flex items to wrap we can see how flex-basis works by dragging the window smaller. .boxes { display: flex; flex-flow: row wrap; justify-content: space-around; } .box { flex: 1 1 200px; min-width: 1px; }
  • 50. Flexbox flex: 0 1 200px; flex-grow: 0 flex-shrink: 1; flex-basis: 200px; The initial width of our box is 200 pixels, it can shrink smaller than 200 pixels but may not get larger. .boxes { display: flex; justify-content: space-around; } .box { flex: 0 1 200px; min-width: 1px; }
  • 52. Flexbox flex: 1 1 200px; flex-grow: 1; flex-shrink: 1; flex-basis: 200px; .box3 has been set to flex: 0 1 200px; so cannot grow. .boxes { display: flex; justify-content: space-around; } .box { flex: 1 1 200px; min-width: 1px; } .box3 { flex: 0 1 200px; }
  • 54. Flexbox If we set box3 to
 flex-grow: 2 This box will be assigned twice of much of the available free space after we have reached the 200 pixel initial width. .boxes { display: flex; justify-content: space-around; } .box { flex: 1 1 200px; min-width: 1px; } .box3 { 2 1 200px; }
  • 57. The CSS Grid Layout fr unit
  • 58. 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; }
  • 59. Grid Layout 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; }
  • 60. Grid Layout 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; }
  • 61. http://alistapart.com/article/holygrail Three columns. One fixed-width sidebar for your navigation, another for, say, your Google Ads or your Flickr photos—and, as in a fancy truffle, a liquid center for the real substance.
  • 62. Grid Layout CSS Grid “Holy Grail” using grid-template- areas. //css .header { grid-area: header;} .footer { grid-area: footer;} .side1 { grid-area: nav;} .side2 { grid-area: ads;} .content { grid-area: content;} .wrapper { display: grid; grid-template-columns: 300px 20px 1fr 20px 300px; grid-template-rows: auto; grid-template-areas: "header header header header header" "nav ...... content ...... ads" "footer footer footer footer footer" ; } //html <div class="wrapper"> <header class="header">This is the header</header> <article class="content"></article> <div class="side1"></div> <div class="side2"></div> <footer class="footer"></div> </div>
  • 66. CSS Grid Layout • Early implementation in IE10, 11 and current Edge • Implementation of most of the current spec behind a flag in Blink • Prefixed in Webkit Nightlies • Partial implementation in Firefox Nightlies • Edge have updating to current spec as ‘High Priority’ on the backlog
  • 68. Thank you Slides & Code: 
 https://rachelandrew.co.uk/presentations/modern-css-layout — @rachelandrew me@rachelandrew.co.uk https://rachelandrew.co.uk http://csslayout.news - sign up for my weekly CSS Layout email