Link tags: css
1129
6 CSS Snippets Every Front-End Developer Should Know In 2025 · 19 January 2025
- Springy easing with
linear()
- Typed custom properties
- View transitions for page navigation
- Transition animation for
dialog
andpopover
- Transition animation for
details
- Animated adaptive gradient text
Justified Text: Better Than Expected? – Cloud Four
Some interesting experiments in web typography here.
una.im | Updates to the customizable select API
It’s great to see the evolution of HTML happening in response to real use-cases—the turbo-charging of the select
element just gets better and better!
CSS wants to be a system - daverupert.com
CSS wants you to build a system with it. It wants styles to build up, not flatten down.
Truth!
Knowing CSS is mastery to Frontend Development — Anselm Hannemann
Anselm isn’t talking about becoming a CSS wizard, but simply having an understanding of what CSS can do. I have had similar experiences to this:
In the past years I had various situations where TypeScript developers (they called themselves) approached me and asked whether I could help them out with CSS. I expected to solve a complex problem but for me — knowing CSS very well — it was always a simple, straightforward solution or code snippet.
Let’s face it, “full stack” usually means “JavaScript”—HTML and CSS aren’t considered worthy of consideration. Their loss.
MomBoard: E-ink display for a parent with amnesia
Technology doesn’t have to be terrible. Here’s an absolutely wonderful use of an e-ink display:
I made as much use of vanilla HTML and CSS as possible. I used a small amount of JavaScript but no framework or other libraries.
Your CSS reset should be layered
This makes sense:
Wrap everything in your CSS reset with a
@layer
rule.When you place any styles inside a layer, these styles automatically have lower priority compared to all unlayered styles on the page. Think of it like an
!unimportant
block. You don’t need to worry about specificity or order of stylesheets at all.
New CSS that can actually be used in 2024 | Thomasorus
Logical properties, container queries, :has
, :is
, :where
, min()
, max()
, clamp()
, nesting, cascade layers, subgrid, and more.
My Modern CSS Reset | jakelazaroff.com
I like the approach here: logical properties and sensible default type and spacing.
Help us choose the final syntax for Masonry in CSS | WebKit
I really like the way that the thinking here is tied back to Bert Bos’s original design principles for CSS.
This is a deep dive into the future of CSS layout—make a cup of tea and settle in for some good nerdiness!
Hyper-responsive web components | Trys Mudford
Trys describes exactly the situation where you really do need to use the Shadow DOM in a web component—as opposed to just sticking to HTML web components—, and that’s when the component is going to be distributed and you have no idea where:
This component needed to be incredibly portable, looking great on any third-party website, in any position, at any viewport, with any amount of content. It had to be a “hyper-responsive” component.
I wasted a day on CSS selector performance to make a website load 2ms faster | Trys Mudford
Picture me holding Trys back and telling him, “Leave it alone, mate, it’s not worth it!”
Building a robust frontend using progressive enhancement - Service Manual - GOV.UK
Oh, how I wish that every team building for the web would use this sensible approach!
Hire HTML and CSS people
Every problem at every company I’ve ever worked at eventually boils down to “please dear god can we just hire people who know how to write HTML and CSS.”
Introducing TODS – a typographic and OpenType default stylesheet | Clagnut by Richard Rutter
This is a very handy piece of work by Rich:
The idea is to set sensible typographic defaults for use on prose (a column of text), making particular use of the font features provided by OpenType. The main principle is that it can be used as starting point for all projects, so doesn’t include design-specific aspects such as font choice, type scale or layout (including how you might like to set the line-length).
The Neverending Story
Since the early days of the web, large corporations have seemingly always wanted more than the web platform or web standards could offer at any given moment. Whether they were aiming for cross-platform-compatibility, more advanced capabilities, or just to be the one runtime/framework/language to rule them all, there’s always been a company that believes they can “fix” it or “own” it.
Applets. ActiveX. Flash. Flex. Silverlight. Angular. React.
It’s about time I tried to explain what progressive enhancement actually is - Piccalilli
Progressive enhancement is a design and development principle where we build in layers which automatically turn themselves on based on the browser’s capabilities.
The idea of progressive enhancement is that everyone gets the perfect experience for them, rather than a pre-determined “perfect” experience from a design and development team.
Popover API Sliding Nav
Here’s a nifty demo of popover
but it’s not for what we’d traditionally consider a modal dialog.