CSS Grid has been available in most major browsers since early 2017,
and it makes web layout more powerful than ever before.
But complex-looking new syntax
(line-names! grid-areas! minmax! fit-content! fr units!)
and missing IE11 support can make it scary to manydevelopers.
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?
Over the summer,
I’ve been working with Mozilla
to help create a new resource
for web professionals –
with a mix of videos,
articles, demos, and open source tools.
we’re excited to launch the video channel!