Getting Creative With HTML Dialog
https://css-tricks.com/getting-creative-with-html-dialog/
https://css-tricks.com/getting-creative-with-html-dialog/
CSS-Tricks
Getting Creative With HTML Dialog | CSS-Tricks
So, how can you take dialogue box design beyond the generic look of frameworks and templates? How can you style them to reflect a brand’s visual identity and help to tell its stories? Here’s how I do it in CSS using ::backdrop, backdrop-filter, and animations.
Exploring the CSS contrast-color() Function… a Second Time
https://css-tricks.com/exploring-the-css-contrast-color-function-a-second-time/
https://css-tricks.com/exploring-the-css-contrast-color-function-a-second-time/
CSS-Tricks
Exploring the CSS contrast-color() Function… a Second Time | CSS-Tricks
The contrast-color() function doesn’t check color contrast, but rather it outright resolves to either black or white (whichever one contrasts the most with your chosen color). Safari Technology Preview recently implemented it and we explore its possible uses…
The State of CSS 2025 Survey is out!
https://css-tricks.com/the-state-of-css-2025-survey-is-out/
https://css-tricks.com/the-state-of-css-2025-survey-is-out/
CSS-Tricks
The State of CSS 2025 Survey is out! | CSS-Tricks
The State of CSS 2025 Survey dropped a few days ago, and besides anticipating the results, it's exciting to see a lot of the new things shipped to CSS reflected in the questions.
Better CSS Shapes Using shape() — Part 3: Curves
https://css-tricks.com/better-css-shapes-using-shape-part-3-curves/
https://css-tricks.com/better-css-shapes-using-shape-part-3-curves/
CSS-Tricks
Better CSS Shapes Using shape() — Part 3: Curves | CSS-Tricks
This is the third article in a series about the CSS shape() function. We've covered drawing lines and arcs in previous articles and, this time, we look specifically at the curve command and how to use it for drawing complex shapes.
Creating an Auto-Closing Notification With an HTML Popover
https://css-tricks.com/creating-an-auto-closing-notification-with-an-html-popover/
https://css-tricks.com/creating-an-auto-closing-notification-with-an-html-popover/
CSS-Tricks
Creating an Auto-Closing Notification With an HTML Popover | CSS-Tricks
The HTML popover attribute transforms elements into top-layer elements that can be opened and closed with a button or JavaScript. Popovers can be dismissed a number of ways, but there is no option to auto-close them. Preethi has a technique you can use.
Breaking Boundaries: Building a Tangram Puzzle With (S)CSS
https://css-tricks.com/breaking-boundaries-building-a-tangram-puzzle-with-scss/
https://css-tricks.com/breaking-boundaries-building-a-tangram-puzzle-with-scss/
CSS-Tricks
Breaking Boundaries: Building a Tangram Puzzle With (S)CSS | CSS-Tricks
We put it to the test and it turns out Sass can replace JavaScript, at least when it comes to low-level logic and puzzle behavior. With nothing but maps, mixins, functions, and a whole lot of math, we managed to bring our Tangram puzzle to life, no JavaScript…
A Better API for the Resize Observer
https://css-tricks.com/a-better-api-for-the-resize-observer/
https://css-tricks.com/a-better-api-for-the-resize-observer/
CSS-Tricks
A Better API for the Resize Observer | CSS-Tricks
ResizeObserver, MutationObserver, and IntersectionObserver enhance performance over their predecessors. Zell discusses their API similarities, usage steps, refactoring strategies, and advantages with practical examples.
How to Keep Up With New CSS Features
https://css-tricks.com/how-to-keep-up-with-new-css-features/
https://css-tricks.com/how-to-keep-up-with-new-css-features/
CSS-Tricks
How to Keep Up With New CSS Features | CSS-Tricks
How do you stay informed of new CSS features when the language evolves quickly and information is spread all around the web? Sacha Greif has some tips from his work running an annual survey focused on new CSS features.
👍1
A Better API for the Intersection and Mutation Observers
https://css-tricks.com/a-better-api-for-the-intersection-and-mutation-observers/
https://css-tricks.com/a-better-api-for-the-intersection-and-mutation-observers/
CSS-Tricks
A Better API for the Intersection and Mutation Observers | CSS-Tricks
Zell discusses refactoring the Resize, Mutation, and Intersection Observer APIs for easier usage, demonstrating how to implement callback and event listener patterns, while highlighting available options and methods.
Lightly Poking at the CSS if() Function in Chrome 137
https://css-tricks.com/lightly-poking-at-the-css-if-function-in-chrome-137/
https://css-tricks.com/lightly-poking-at-the-css-if-function-in-chrome-137/
CSS-Tricks
Lightly Poking at the CSS if() Function in Chrome 137 | CSS-Tricks
The CSS if() function was recently implemented in Chrome 137, making it the first instance where we have it supported by a mainstream browser. Let's poke at it a bit at a very high level.
Poking at the CSS if() Function a Little More: Conditional Color Theming
https://css-tricks.com/poking-at-the-css-if-function-a-little-more-conditional-color-theming/
https://css-tricks.com/poking-at-the-css-if-function-a-little-more-conditional-color-theming/
CSS-Tricks
Poking at the CSS if() Function a Little More: Conditional Color Theming | CSS-Tricks
The CSS if() function enables us to use values conditionally, but what exactly does if() do? Let's look at a possible real-world use case.
Using CSS Cascade Layers With Tailwind Utilities
https://css-tricks.com/using-css-cascade-layers-with-tailwind-utilities/
https://css-tricks.com/using-css-cascade-layers-with-tailwind-utilities/
CSS-Tricks
Using CSS Cascade Layers With Tailwind Utilities | CSS-Tricks
Being the bad boy I am, I don't take Tailwind's default approach to cascade layers as the "best" one. Over a year experimenting with Tailwind and vanilla CSS, I've come across what I believe is a better solution.
The Gap Strikes Back: Now Stylable
https://css-tricks.com/the-gap-strikes-back-now-stylable/
https://css-tricks.com/the-gap-strikes-back-now-stylable/
CSS-Tricks
The Gap Strikes Back: Now Stylable | CSS-Tricks
Styling the space between layout items — the gap — has typically required some clever workarounds. But a new CSS feature changes all that with just a few simple CSS properties that make it easy, yet also flexible, to display styled separators between your…
Better CSS Shapes Using shape() — Part 4: Close and Move
https://css-tricks.com/better-css-shapes-using-shape-part-4-close-and-move/
https://css-tricks.com/better-css-shapes-using-shape-part-4-close-and-move/
CSS-Tricks
Better CSS Shapes Using shape() — Part 4: Close and Move | CSS-Tricks
The shape() function's close and move commands may not be ones you reach for often, but are incredibly useful for certain shapes.
Scroll-Driven Sticky Heading
https://css-tricks.com/scroll-driven-sticky-heading/
https://css-tricks.com/scroll-driven-sticky-heading/
CSS-Tricks
Scroll-Driven Sticky Heading | CSS-Tricks
I was playing around with scroll-driven animations, just searching for all sorts of random things you could do. That’s when I came up with the idea to animate main headings and, using scroll-driven animations, change the headings based on the user’s scroll…
Setting Line Length in CSS (and Fitting Text to a Container)
https://css-tricks.com/setting-line-length-in-css-and-fitting-text-to-a-container/
https://css-tricks.com/setting-line-length-in-css-and-fitting-text-to-a-container/
CSS-Tricks
Setting Line Length in CSS (and Fitting Text to a Container) | CSS-Tricks
The many ways to juggle line length when working with text... including two proposed properties that could make it easier in the future.