Card layouts are popular on the web,
rows and columns of boxes with similar content.
CSS grids can help align those cards,
but it’s still be hard to line-up content inside the cards –
headers and footers that might need more or lessroom.
That’s why we need “subgrid” –
coming in Firefox 71 (Dec 3)
and available now in Firefox Nightly.
This is a great opportunity to
quickly enhance our designs for modern browsers,
without losing anything in the browsers without subgridsupport.
Horizontal text overflow has always been difficult to manage on the web.
The default visible overflow
is designed to make sure content remains accessible
no matter the size of a containing box,
but it’s not our onlyoption.
When we’re scrolling down a page,
or through a gallery of images,
snap-targets can help guide us from one section or image to the next.
but now we can manage scroll alignment directly in CSS
with only a few lines ofcode.
The display property has been in CSS from the beginning,
handling everything from block and inline boxes
to list-items and full layout systems like flexbox or grid.
Now the display syntax is getting an upgrade
to match it’s multipleuses.
There are a number of property & value combinations
that can lead to CSS being inactive,
and now Firefox will tell you why.
Open the developer tools,
and look for the greyed-out property with an info-box onhover.
I’ve often used initial and unset in my CSS –
global keywords that can be applied to any property.
The difference is small, but important:
unset allows inheritance,
while initial does not.
But then Firefox implemented revert and I was confused –
how is this one different from theothers?!
CSS is the design language of the web –
one of three core web languages –
but it also seems to be the most contentious and often perplexing.
It’s too easy and too hard,
too fragile and too resilient.
Love it or hate it, CSS is weird:
not quite markup,
not quite programming in the imperative sense,
and nothing like the design programs we use for print.
How did we gethere?