SlideShare a Scribd company logo
CSS Grid vs.
Flexible Box
@evalica
Layout Evolution
● CSS2
● CSS3
CSS2.1
● no
●
CSS3 Level
Modules Timeline
Layout Specifications
Float Display Position Flex Grid
Launched 1996- 1996-2011- 2008-2011- 2009-2016-2018- 2012-2017-
Level CSS1 CSS1, CSS2.1 CSS2.1 CSS3, Lvl1 CSS3, Lvl1
Maturity REC REC REC CR CR
Syntax float:
none|left|right|
initial|inherit;
display:
none|inline|block|
List-item|
inline-block|table|
...;
position:
static|absolute|
Fixed|relative|
Sticky|initial|
inherit;
display: flex;
flex: flex-grow
flex-shrink
flex-basis|auto|
initial|inherit;
display: grid;
grid:
none|grid-template-
rows /
grid-template-colum
ns|grid-template-ar
eas|grid-template-r
ows /
[grid-auto-flow]
grid-auto-columns|[
grid-auto-flow]
grid-auto-rows /
grid-template-colum
ns|initial|inherit;
CR
REC
CSS Grid vs. Flexbox
Guides & Documentation
MDN: Flexbox
CSS Tricks Guide
MDN: Grid
CSS Tricks Guide
Screencasts Tutorials
Game Tutorials
Flexbox Froggy Grid Garden
Grid vs. Flex
● one direction
●
● direction-agnostic
● cannot overlap
Flexible Box
● two directions
●
● overlap
CSS Grid
Can I use?
Flexible Box
98.30% JUN 2019
@supports not ((display: flex) and (display: grid))
{
div {
float: left;
}
}
CR .
@supports (display: grid) {
.wrapper ul {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 20px;
}
}
Can I use?
CSS Grid
92.03% JUN 2019CR .
Basic Alternatives
Float GridFlex
<div class="container">
<div class="box a">A</div>
<div class="box b">B</div>
<div class="box c">C</div>
<div class="box d">D</div>
<div class="box e">E</div>
<div class="box f">F</div>
</div>
.container {
}
.box {
float: left;
margin: 5px;
width: 100px;
}
.container {
display: grid;
grid-gap: 10px;
grid-template-columns:
repeat(auto-fit, 100px);
}
.box {
}
.container {
display: flex;
flex-wrap: wrap;
}
.box {
flex-basis: 100px;
margin: 5px;
}
Firefox
Nightly
.a {
grid-column: 1 / 3;
grid-row: 1;
}
.b {
grid-column: 3;
grid-row: 1 / 3;
}
.c {
grid-column: 1;
grid-row: 2 / 4;
}
.a {
}
.b {
}
.c {
}
.container {
display: grid;
grid-gap: 10px;
grid-template-columns:
repeat(3, 100px);
}
Grid Overlap
.a {
grid-column: 1;
grid-row: 1;
}
.b {
grid-column: 2;
grid-row: 1;
}
.c {
grid-column: 3;
grid-row: 1;
}
Bootstrap 4 - FlexBootstrap 3 - Float
<div class="container">
<div class="row">
<div class="col-xs-4">A</div>
<div class="col-xs-4">B</div>
<div class="col-xs-4">C</div>
</div>
</div>
Grid
<div class="container">
<div class="row">
<div class="col">A</div>
<div class="col">B</div>
<div class="col">C</div>
</div>
</div>
<div class="container">
<div class="col">A</div>
<div class="col">B</div>
<div class="col">C</div>
</div>
.container {
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-gap: 10px;
}
.col {
grid-column: span 4;
}
.row {
display: flex;
}
.col {
flex-basis: 0;
flex-grow: 1;
}
Nested Layout
Layouts
.header {
grid-area: H;
}
.panels.A {
grid-area: A;
}
.panels.B {
grid-area: B;
}
.content {
grid-area: C;
}
.footer {
grid-area: F;
}
<body>
<div class="header">H</div>
<div class="content">C</div>
<div class="panels A">A</div>
<div class="panels B">B</div>
<div class="footer">F</div>
</body>
Grid Areas - Easy Prototyping
body {
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-template-rows: 1fr 4fr 1fr;
grid-template-areas:
"H H H H H H H H H H H H"
"A C C C C C C C C C C B"
"F F F F F F F F F F F F";
}
Layouts
4-134-12
Display: contents
<body>
<div class="header">H</div>
<div class="content">C</div>
<div class="panels A">A</div>
<div class="panels B">B</div>
<div class="footer">F</div>
</body>
<body>
<div class="header">H</div>
<div class="container">
<div class="container">
<div class="content">C</div>
<div class="panels A">A</div>
</div>
<div class="panels B">B</div>
</div>
<div class="footer">F</div>
</body>
.container {
display: contents;
}
Can I use?
display: contents
82.38% JUN 2019
ul, ol {
list-style: none;
display: contents;
}
WD .
.download-option {
display: grid;
grid-template-rows: subgrid;
grid-row: 1 / -1;
}
<div class="download-options">
<div class="download-option">
<div>...</div>
<h3>...</h3>
<ul><li>...</li></ul>
<p>...</p>
<div><a>...</a><a>...</a></div>
</div>
...
SubGrid - Cards Alignment
.download-options {
display: grid;
grid-template-rows: repeat(5, auto);
}
Can I use?
Subgrid
0.0% JUN 2019
.items {
display: grid;
grid-template-columns: subgrid;
grid-auto-rows: minmax(100px, auto);
}
WD .
●
●
●
●
●
●
Conclusions: Grid vs. Flex
Thank you
@evalica #iscss
References
● A Complete Guide to Flexbox
● A Complete Guide to Grid
● MDN: CSS layout
● MDN: Subgrid
● Grid by Example
● The Experimental Layouts Lab
● [Games] Grid Garden + Flexbox Froggy
● [Video] Flexbox vs. CSS Grid — Which is
Better?
● [Video] Hello Subgrid!
● [Video] CSS Grid: Moving From CSS
Frameworks To CSS Grid (2018 and beyond)
● CSS Grids — How Everyone Has Been
Building The Web Wrong Before 2018

More Related Content

What's hot (20)

Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
Rachel Andrew
 
CSS Grid
CSS GridCSS Grid
CSS Grid
Digital Surgeons
 
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
Scrum Breakfast Vietnam
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
Rachel Andrew
 
Flexbox
FlexboxFlexbox
Flexbox
Netcetera
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
Flex box
Flex boxFlex box
Flex box
Harish Karthick
 
Bootstrap
BootstrapBootstrap
Bootstrap
AvinashChunduri2
 
CSS Lists and Tables
CSS Lists and TablesCSS Lists and Tables
CSS Lists and Tables
Gerson Abesamis
 
Bootstrap PPT by Mukesh
Bootstrap PPT by MukeshBootstrap PPT by Mukesh
Bootstrap PPT by Mukesh
Mukesh Kumar
 
Dynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation BasicsDynamic CSS: Transforms, Transitions, and Animation Basics
Dynamic CSS: Transforms, Transitions, and Animation Basics
Beth Soderberg
 
CSS3 2D/3D transform
CSS3 2D/3D transformCSS3 2D/3D transform
CSS3 2D/3D transform
Kenny Lee
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
Webtech Learning
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Sanjeev Kumar
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
www.netgains.org
 
CSS
CSSCSS
CSS
People Strategists
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to Z
Shameem Reza
 
Style and Selector
Style and SelectorStyle and Selector
Style and Selector
Yaowaluck Promdee
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/Jquery
FAKHRUN NISHA
 

Similar to CSS Grid vs. Flexbox (20)

An Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid LayoutAn Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid Layout
Rachel Andrew
 
CSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, LinzCSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, Linz
Rachel Andrew
 
Devoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid LayoutDevoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid Layout
Rachel Andrew
 
An Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid LayoutAn Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid Layout
Rachel Andrew
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
Rachel Andrew
 
Evergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersEvergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsers
Rachel Andrew
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to 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
 
CSS3 Layout
CSS3 LayoutCSS3 Layout
CSS3 Layout
Zoe Gillenwater
 
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
 
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
 
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
 
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
 
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
 
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
 
Grids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid LayoutGrids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid Layout
Simone Lelli
 
New CSS Meets the Real World
New CSS Meets the Real WorldNew CSS Meets the Real World
New CSS Meets the Real World
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
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
Rachel Andrew
 
An Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid LayoutAn Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid Layout
Rachel Andrew
 
CSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, LinzCSS Grid Layout for Topconf, Linz
CSS Grid Layout for Topconf, Linz
Rachel Andrew
 
Devoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid LayoutDevoxx Belgium: CSS Grid Layout
Devoxx Belgium: CSS Grid Layout
Rachel Andrew
 
An Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid LayoutAn Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid Layout
Rachel Andrew
 
Evergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsersEvergreen websites for Evergreen browsers
Evergreen websites for Evergreen browsers
Rachel Andrew
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to 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
 
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
 
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
 
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
 
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
 
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
 
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
 
Grids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid LayoutGrids of Tomorrow: CSS Grid Layout
Grids of Tomorrow: CSS Grid Layout
Simone Lelli
 
New CSS Meets the Real World
New CSS Meets the Real WorldNew CSS Meets the Real World
New CSS Meets the Real World
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
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
Rachel Andrew
 

More from Ecaterina Moraru (Valica) (20)

UI/UX Tips & Tricks for developers - FOSDEM2020
UI/UX Tips & Tricks for developers - FOSDEM2020UI/UX Tips & Tricks for developers - FOSDEM2020
UI/UX Tips & Tricks for developers - FOSDEM2020
Ecaterina Moraru (Valica)
 
UI/UX Tips & Tricks for developers
UI/UX Tips & Tricks for developersUI/UX Tips & Tricks for developers
UI/UX Tips & Tricks for developers
Ecaterina Moraru (Valica)
 
Sketching Session
Sketching SessionSketching Session
Sketching Session
Ecaterina Moraru (Valica)
 
Designing in the open
Designing in the openDesigning in the open
Designing in the open
Ecaterina Moraru (Valica)
 
XWiki Skin 10.x+ ideas
XWiki Skin 10.x+ ideasXWiki Skin 10.x+ ideas
XWiki Skin 10.x+ ideas
Ecaterina Moraru (Valica)
 
Difficulties in having more designers participate in Open Source
Difficulties in having more designers participate in Open SourceDifficulties in having more designers participate in Open Source
Difficulties in having more designers participate in Open Source
Ecaterina Moraru (Valica)
 
CSS Variables — Native reusable custom properties
CSS Variables — Native reusable custom propertiesCSS Variables — Native reusable custom properties
CSS Variables — Native reusable custom properties
Ecaterina Moraru (Valica)
 
Icon Themes
Icon ThemesIcon Themes
Icon Themes
Ecaterina Moraru (Valica)
 
Design proposals status 9.x
Design proposals status 9.xDesign proposals status 9.x
Design proposals status 9.x
Ecaterina Moraru (Valica)
 
What's new in XWiki 8.x and half of 9.x
What's new in XWiki 8.x and half of 9.x What's new in XWiki 8.x and half of 9.x
What's new in XWiki 8.x and half of 9.x
Ecaterina Moraru (Valica)
 
Expectations from Open Source Designers
Expectations from Open Source DesignersExpectations from Open Source Designers
Expectations from Open Source Designers
Ecaterina Moraru (Valica)
 
Success stats from OSD community
Success stats from OSD communitySuccess stats from OSD community
Success stats from OSD community
Ecaterina Moraru (Valica)
 
Future of XWiki Skins
Future of XWiki SkinsFuture of XWiki Skins
Future of XWiki Skins
Ecaterina Moraru (Valica)
 
Design process in an Open Community
Design process in an Open CommunityDesign process in an Open Community
Design process in an Open Community
Ecaterina Moraru (Valica)
 
XWiki Usability Testing Sessions
XWiki Usability Testing SessionsXWiki Usability Testing Sessions
XWiki Usability Testing Sessions
Ecaterina Moraru (Valica)
 
About XWiki.org
About XWiki.orgAbout XWiki.org
About XWiki.org
Ecaterina Moraru (Valica)
 
Evolution of CSS
Evolution of CSSEvolution of CSS
Evolution of CSS
Ecaterina Moraru (Valica)
 
XWiki Improvements Review (ver 2.4 - 5.1)
XWiki Improvements Review (ver 2.4 - 5.1)XWiki Improvements Review (ver 2.4 - 5.1)
XWiki Improvements Review (ver 2.4 - 5.1)
Ecaterina Moraru (Valica)
 
Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...
Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...
Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...
Ecaterina Moraru (Valica)
 
Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...
Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...
Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...
Ecaterina Moraru (Valica)
 
UI/UX Tips & Tricks for developers - FOSDEM2020
UI/UX Tips & Tricks for developers - FOSDEM2020UI/UX Tips & Tricks for developers - FOSDEM2020
UI/UX Tips & Tricks for developers - FOSDEM2020
Ecaterina Moraru (Valica)
 
Difficulties in having more designers participate in Open Source
Difficulties in having more designers participate in Open SourceDifficulties in having more designers participate in Open Source
Difficulties in having more designers participate in Open Source
Ecaterina Moraru (Valica)
 
CSS Variables — Native reusable custom properties
CSS Variables — Native reusable custom propertiesCSS Variables — Native reusable custom properties
CSS Variables — Native reusable custom properties
Ecaterina Moraru (Valica)
 
Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...
Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...
Interconectarea Semantica A Datelor In Contextul Managementului Informatiilor...
Ecaterina Moraru (Valica)
 
Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...
Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...
Tehnici De Tip Mashup Pentru Interactiuni Web In Sisteme Informationale Geogr...
Ecaterina Moraru (Valica)
 

Recently uploaded (20)

SQL Database Design For Developers at PhpTek 2025.pptx
SQL Database Design For Developers at PhpTek 2025.pptxSQL Database Design For Developers at PhpTek 2025.pptx
SQL Database Design For Developers at PhpTek 2025.pptx
Scott Keck-Warren
 
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStackProposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
ShapeBlue
 
Stretching CloudStack over multiple datacenters
Stretching CloudStack over multiple datacentersStretching CloudStack over multiple datacenters
Stretching CloudStack over multiple datacenters
ShapeBlue
 
Breaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP DevelopersBreaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP Developers
pmeth1
 
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
 
PSEP - Salesforce Power of the Platform.pdf
PSEP - Salesforce Power of the Platform.pdfPSEP - Salesforce Power of the Platform.pdf
PSEP - Salesforce Power of the Platform.pdf
ssuser3d62c6
 
Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...
Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...
Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...
UXPA Boston
 
Four Principles for Physically Interpretable World Models
Four Principles for Physically Interpretable World ModelsFour Principles for Physically Interpretable World Models
Four Principles for Physically Interpretable World Models
Ivan Ruchkin
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 
AI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological ImpactAI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological Impact
SaikatBasu37
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
MuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World Tips
MuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World TipsMuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World Tips
MuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World Tips
Patryk Bandurski
 
How to Integrate FME with Databricks (and Why You’ll Want To)
How to Integrate FME with Databricks (and Why You’ll Want To)How to Integrate FME with Databricks (and Why You’ll Want To)
How to Integrate FME with Databricks (and Why You’ll Want To)
Safe Software
 
Dr Schwarzkopf presentation on STKI Summit A
Dr Schwarzkopf presentation on STKI Summit ADr Schwarzkopf presentation on STKI Summit A
Dr Schwarzkopf presentation on STKI Summit A
Dr. Jimmy Schwarzkopf
 
"AI in the browser: predicting user actions in real time with TensorflowJS", ...
"AI in the browser: predicting user actions in real time with TensorflowJS", ..."AI in the browser: predicting user actions in real time with TensorflowJS", ...
"AI in the browser: predicting user actions in real time with TensorflowJS", ...
Fwdays
 
NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...
NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...
NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...
derrickjswork
 
Introducing High Availability: Business Continuity for Every NAS User
Introducing High Availability: Business Continuity for Every NAS UserIntroducing High Availability: Business Continuity for Every NAS User
Introducing High Availability: Business Continuity for Every NAS User
QNAP Marketing
 
Wondershare Filmora 14.3.2 Crack + License Key Free for Windows PC
Wondershare Filmora 14.3.2 Crack + License Key Free for Windows PCWondershare Filmora 14.3.2 Crack + License Key Free for Windows PC
Wondershare Filmora 14.3.2 Crack + License Key Free for Windows PC
Mudasir
 
AI needs Hybrid Cloud - TEC conference 2025.pptx
AI needs Hybrid Cloud - TEC conference 2025.pptxAI needs Hybrid Cloud - TEC conference 2025.pptx
AI needs Hybrid Cloud - TEC conference 2025.pptx
Shikha Srivastava
 
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc
 
SQL Database Design For Developers at PhpTek 2025.pptx
SQL Database Design For Developers at PhpTek 2025.pptxSQL Database Design For Developers at PhpTek 2025.pptx
SQL Database Design For Developers at PhpTek 2025.pptx
Scott Keck-Warren
 
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStackProposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
ShapeBlue
 
Stretching CloudStack over multiple datacenters
Stretching CloudStack over multiple datacentersStretching CloudStack over multiple datacenters
Stretching CloudStack over multiple datacenters
ShapeBlue
 
Breaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP DevelopersBreaking it Down: Microservices Architecture for PHP Developers
Breaking it Down: Microservices Architecture for PHP Developers
pmeth1
 
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
 
PSEP - Salesforce Power of the Platform.pdf
PSEP - Salesforce Power of the Platform.pdfPSEP - Salesforce Power of the Platform.pdf
PSEP - Salesforce Power of the Platform.pdf
ssuser3d62c6
 
Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...
Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...
Eating Our Own Dog Food: How to be taken seriously when it comes to adding va...
UXPA Boston
 
Four Principles for Physically Interpretable World Models
Four Principles for Physically Interpretable World ModelsFour Principles for Physically Interpretable World Models
Four Principles for Physically Interpretable World Models
Ivan Ruchkin
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 
AI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological ImpactAI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological Impact
SaikatBasu37
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
MuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World Tips
MuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World TipsMuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World Tips
MuleSoft RTF & Flex Gateway on AKS – Setup, Insights & Real-World Tips
Patryk Bandurski
 
How to Integrate FME with Databricks (and Why You’ll Want To)
How to Integrate FME with Databricks (and Why You’ll Want To)How to Integrate FME with Databricks (and Why You’ll Want To)
How to Integrate FME with Databricks (and Why You’ll Want To)
Safe Software
 
Dr Schwarzkopf presentation on STKI Summit A
Dr Schwarzkopf presentation on STKI Summit ADr Schwarzkopf presentation on STKI Summit A
Dr Schwarzkopf presentation on STKI Summit A
Dr. Jimmy Schwarzkopf
 
"AI in the browser: predicting user actions in real time with TensorflowJS", ...
"AI in the browser: predicting user actions in real time with TensorflowJS", ..."AI in the browser: predicting user actions in real time with TensorflowJS", ...
"AI in the browser: predicting user actions in real time with TensorflowJS", ...
Fwdays
 
NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...
NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...
NVIDIA’s Enterprise AI Factory and Blueprints_ Paving the Way for Smart, Scal...
derrickjswork
 
Introducing High Availability: Business Continuity for Every NAS User
Introducing High Availability: Business Continuity for Every NAS UserIntroducing High Availability: Business Continuity for Every NAS User
Introducing High Availability: Business Continuity for Every NAS User
QNAP Marketing
 
Wondershare Filmora 14.3.2 Crack + License Key Free for Windows PC
Wondershare Filmora 14.3.2 Crack + License Key Free for Windows PCWondershare Filmora 14.3.2 Crack + License Key Free for Windows PC
Wondershare Filmora 14.3.2 Crack + License Key Free for Windows PC
Mudasir
 
AI needs Hybrid Cloud - TEC conference 2025.pptx
AI needs Hybrid Cloud - TEC conference 2025.pptxAI needs Hybrid Cloud - TEC conference 2025.pptx
AI needs Hybrid Cloud - TEC conference 2025.pptx
Shikha Srivastava
 
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc Webinar: Cross-Border Data Transfers in 2025
TrustArc
 

CSS Grid vs. Flexbox

  • 1. CSS Grid vs. Flexible Box @evalica
  • 3. ● CSS2 ● CSS3 CSS2.1 ● no ● CSS3 Level
  • 5. Layout Specifications Float Display Position Flex Grid Launched 1996- 1996-2011- 2008-2011- 2009-2016-2018- 2012-2017- Level CSS1 CSS1, CSS2.1 CSS2.1 CSS3, Lvl1 CSS3, Lvl1 Maturity REC REC REC CR CR Syntax float: none|left|right| initial|inherit; display: none|inline|block| List-item| inline-block|table| ...; position: static|absolute| Fixed|relative| Sticky|initial| inherit; display: flex; flex: flex-grow flex-shrink flex-basis|auto| initial|inherit; display: grid; grid: none|grid-template- rows / grid-template-colum ns|grid-template-ar eas|grid-template-r ows / [grid-auto-flow] grid-auto-columns|[ grid-auto-flow] grid-auto-rows / grid-template-colum ns|initial|inherit; CR REC
  • 7. Guides & Documentation MDN: Flexbox CSS Tricks Guide MDN: Grid CSS Tricks Guide
  • 11. ● one direction ● ● direction-agnostic ● cannot overlap Flexible Box
  • 12. ● two directions ● ● overlap CSS Grid
  • 13. Can I use? Flexible Box 98.30% JUN 2019 @supports not ((display: flex) and (display: grid)) { div { float: left; } } CR .
  • 14. @supports (display: grid) { .wrapper ul { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 20px; } } Can I use? CSS Grid 92.03% JUN 2019CR .
  • 15. Basic Alternatives Float GridFlex <div class="container"> <div class="box a">A</div> <div class="box b">B</div> <div class="box c">C</div> <div class="box d">D</div> <div class="box e">E</div> <div class="box f">F</div> </div> .container { } .box { float: left; margin: 5px; width: 100px; } .container { display: grid; grid-gap: 10px; grid-template-columns: repeat(auto-fit, 100px); } .box { } .container { display: flex; flex-wrap: wrap; } .box { flex-basis: 100px; margin: 5px; }
  • 17. .a { grid-column: 1 / 3; grid-row: 1; } .b { grid-column: 3; grid-row: 1 / 3; } .c { grid-column: 1; grid-row: 2 / 4; } .a { } .b { } .c { } .container { display: grid; grid-gap: 10px; grid-template-columns: repeat(3, 100px); } Grid Overlap .a { grid-column: 1; grid-row: 1; } .b { grid-column: 2; grid-row: 1; } .c { grid-column: 3; grid-row: 1; }
  • 18. Bootstrap 4 - FlexBootstrap 3 - Float <div class="container"> <div class="row"> <div class="col-xs-4">A</div> <div class="col-xs-4">B</div> <div class="col-xs-4">C</div> </div> </div> Grid <div class="container"> <div class="row"> <div class="col">A</div> <div class="col">B</div> <div class="col">C</div> </div> </div> <div class="container"> <div class="col">A</div> <div class="col">B</div> <div class="col">C</div> </div> .container { display: grid; grid-template-columns: repeat(12, 1fr); grid-gap: 10px; } .col { grid-column: span 4; } .row { display: flex; } .col { flex-basis: 0; flex-grow: 1; }
  • 21. .header { grid-area: H; } .panels.A { grid-area: A; } .panels.B { grid-area: B; } .content { grid-area: C; } .footer { grid-area: F; } <body> <div class="header">H</div> <div class="content">C</div> <div class="panels A">A</div> <div class="panels B">B</div> <div class="footer">F</div> </body> Grid Areas - Easy Prototyping body { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 1fr 4fr 1fr; grid-template-areas: "H H H H H H H H H H H H" "A C C C C C C C C C C B" "F F F F F F F F F F F F"; }
  • 23. Display: contents <body> <div class="header">H</div> <div class="content">C</div> <div class="panels A">A</div> <div class="panels B">B</div> <div class="footer">F</div> </body> <body> <div class="header">H</div> <div class="container"> <div class="container"> <div class="content">C</div> <div class="panels A">A</div> </div> <div class="panels B">B</div> </div> <div class="footer">F</div> </body> .container { display: contents; }
  • 24. Can I use? display: contents 82.38% JUN 2019 ul, ol { list-style: none; display: contents; } WD .
  • 25. .download-option { display: grid; grid-template-rows: subgrid; grid-row: 1 / -1; } <div class="download-options"> <div class="download-option"> <div>...</div> <h3>...</h3> <ul><li>...</li></ul> <p>...</p> <div><a>...</a><a>...</a></div> </div> ... SubGrid - Cards Alignment .download-options { display: grid; grid-template-rows: repeat(5, auto); }
  • 26. Can I use? Subgrid 0.0% JUN 2019 .items { display: grid; grid-template-columns: subgrid; grid-auto-rows: minmax(100px, auto); } WD .
  • 29. References ● A Complete Guide to Flexbox ● A Complete Guide to Grid ● MDN: CSS layout ● MDN: Subgrid ● Grid by Example ● The Experimental Layouts Lab ● [Games] Grid Garden + Flexbox Froggy ● [Video] Flexbox vs. CSS Grid — Which is Better? ● [Video] Hello Subgrid! ● [Video] CSS Grid: Moving From CSS Frameworks To CSS Grid (2018 and beyond) ● CSS Grids — How Everyone Has Been Building The Web Wrong Before 2018