🇲🇾
👾
🏀
🚲
🖌️
👟
💻
🖊️
🎙
🦊
🧗
🏳️🌈
First off, quick introduction. My name is Hui Jing, and I'm simple enough that these emojis paint a fairly comprehensive picture of who I am as a person. I happen to be Chinese, and if you're unfamiliar with Chinese names, our family names come first, followed by our first names. I'm currently a front end developer at Shopify.
CSS has come of age
I want to first remind everyone that CSS has come of age. If we take the first W3C recommendation as a birthday milestone, that was December 1996. So CSS is going to be 25 years old soon. And boy has it grown up well. From a time where CSS was not really meant for doing layout till today, where CSS is THE go-to method for creating web layouts.
Modern CSS solutions for…
Responsive text
Scroll snap
Sticky elements
Masonry layout
Container queries
We have more than 500 CSS properties today, providing us with a much wider vocabulary with which to communicate to the browser about how we'd like our web pages to look and behave. There are things that we can build with CSS that we could not before without the help of Javascript or semi-clunky workarounds.
Masonry layout
Try it in your browser
This feature is only implemented in Firefox, and can be enabled by setting the flag layout.css.grid-template-masonry-value.enabled
to true, in order to allow testing and providing of feedback.
Container queries
Try it in your browser
This feature is only implemented in Chrome Canary, and can be enabled with the "Enable CSS Container Queries" feature flag under chrome://flags
, in order to allow testing and providing of feedback.
There is no one right way to do things. Context is everything.
When I write CSS, I always remind myself to keep an open mind. CSS is evolving faster than it used to, and it is also becoming more powerful than before. And yet, having new features doesn't necessarily make all the old properties obsolete. CSS may not be everyone's cup of tea, but it certainly is mine.
Further reading and references