I left the frontend-dev field around 2017 and Flexbox was the new thing, which I played with.
I need to get updated again, so what other new things should I learn for CSS?
I left the frontend-dev field around 2017 and Flexbox was the new thing, which I played with.
I need to get updated again, so what other new things should I learn for CSS?
Just off the top of my head, but I’m sure I’m missing a LOT
It only has an archive of the last three years, but this survey of industry professionals (participants) is always an interesting read
It’s also worth looking into:
min()
, max()
and clamp()
gap
property for Flexbox and Gridscroll-snap
:focus-visible
::marker
, which let’s you style list bullets etc!accent-color
and color-scheme
text-underline-offset
lvh/lvw
, svh/svw
and dvh/dvw
@media (360px <= width <= 820px) {
}
@layer
rule (which helps you control the cascade)@supports
ruleThese days you’ll never learn “all of CSS” but you should be aware of what you can use even if you have to look up the specific details each time.
CSS grid is probably the first thing to become familiar with but not to forget flex as they do different things (although they can do the same things at times).
There’s so much that’s new that you can’t remember all the specific details but as long as you are aware of what they are you can easily look up the the exact css needed.
In most cases sites can be done without having to use every new fangled property if constructed wisely. However, it’s good to know what’s available when you have tricky situations. The posts above list most of the interesting properties so it’s good to know what they are and what they do and then you can look for them when you need them.
I’m in a similar boat of coming back to CSS after not being very actively involved with it for some years. The two things I’ve found most interesting and worth learning first are Flexbox and Grid (as Paul mentioned above). There are lots of great resources for learning them (such as videos on YouTube by people like Kevin Powell), but if I were to recommend one resource for starting with each, it would be these:
Love Kevin Powell!
His Youtube channel is great, and a combination of short tips and longer, more in-depth studies. He also has several good courses, some free, others have a cost which I found worth the money.
This was also discussed on a recent Syntax podcast. Lot’s of good info here.
This and the subsequent pages will help you get up-to-date in no time: https://www.w3schools.com/cssref/css4_pr_accent-color.php. It is the first page of a long list of pages with all the old and new CSS properties plus their values and editable examples.
You should also go through:
Some people don’t like W3Schools but I think it is great, despite that it sometimes says that something is not supported by MS Edge. That has changed since Edge started using the Chromium engine.