@joshtumath
There’s a great, big, beautiful tomorrow
with intrinsic Web layouts
Theres a great, big, beautiful tomorrow with intrinsic Web layouts - - PowerPoint PPT Presentation
Theres a great, big, beautiful tomorrow with intrinsic Web layouts @joshtumath Josh Tumath Front-End Web Developer Presentation Layer, Core Services @joshtumath The world of TODAY The principals of The world of
@joshtumath
with intrinsic Web layouts
@joshtumath
Josh Tumath
Front-End Web Developer Presentation Layer, Core Services
@joshtumath
The world of TODAY The world of TOMORROW ✨
✨
✨ ✨
✨
The principals of TOMORROW
@joshtumath
Source: Disneyland Resort
@joshtumath
The default layout method
Source: https://oneterabyteoflilobyteage.tumblr.com/
@joshtumath
Abusing the table element for layouts
Source: BBC
@joshtumath
m.bbc.co.uk for mobiles bbc.co.uk for desktops
@joshtumath
Cleverly misusing CSS property float: left and percentages or fixed width boxes
Source: BBC
@joshtumath
@joshtumath
The full power of CSS Media Queries
Source: BBC
@joshtumath
@joshtumath
We can’t easily size things so that they don’t get cut off at the fold
Source: BBC
@joshtumath
All grid columns must be either fixed
widths
@joshtumath
Source: BBC
@joshtumath
Source: ProgressCityUSA
@joshtumath
@joshtumath
Multi-column
Regions
min(n, m) max(n, m)
clamp(min, value, max)
@supports
minmax(n, m)
min-content max-content
aspect-ratio
fr units
Shapes
@joshtumath
@joshtumath
Jen Simmons
“The more I understood what CSS Grid wants to do, I realised we’re in a new era
Source: Jen Simmons, ‘Everything You Know About Web Design Just Changed’ (2018)
@joshtumath
@joshtumath
@joshtumath
@joshtumath
@joshtumath
setting breakpoints
in the same layout
@joshtumath Check it out: https://codepen.io/joshtumath/pen/LYVOdbR
@joshtumath
And as designers and developers, we need to understand what we can do.
@joshtumath Check it out: https://every-layout.dev
@joshtumath
Intrinsic Web Design +
Design Systems
@joshtumath
@joshtumath
*but we’re thinking about it
@joshtumath
@joshtumath
Source: TheOriginalEpcot
How to put intrinsic layouts in your design system
@joshtumath
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); }
@joshtumath
@joshtumath
Split layouts from components
You can avoid re-implementing layouts in each component
@joshtumath
Don’t set margins on the edges of components
Let the parent components do that instead
.stack > * + * { margin-top: 1rem; } .grid { display: grid; gap: 1rem; } .card { margin: 1rem 0; }
@joshtumath
Encapsulate the styles of each component
Don't let parent components change the style of a component
<Card> <div class=“card-image”> <Image /> </div> <div class=“card-content”> <p>Lorem ipsum</p> <div> </Card> .Card .Image { width: 50%; }
@joshtumath
@joshtumath
@joshtumath
Source: Walt Disney Imagineering
@joshtumath https://joshtumath.uk