Advertisement ยท 728 ร— 90

Posts by Victor

A digital menu displays various chicken items with pricing; includes Deluxe Chicken Club and Shwarma options, highlighting selection choices.

A digital menu displays various chicken items with pricing; includes Deluxe Chicken Club and Shwarma options, highlighting selection choices.

Proximity rule violation as it is.

Did I choose Deluxe Chicken Club or Shwarma?

8 hours ago 1 0 1 0
CSS code demonstrates a transition effect for opacity under specific classes, focusing on easing and initial state settings.

CSS code demonstrates a transition effect for opacity under specific classes, focusing on easing and initial state settings.

Code sample.

Browser support is around 91%.

As always, you can use @ supports for progressive enhancement.

No JavaScript. No workarounds. Just CSS.

1 day ago 0 0 0 0

How it works:

Define your element's normal state, add a transition, then use @starting-style to set where it should animate from.

When the element renders, it starts with @starting-style values and transitions to the regular styles.

1 day ago 0 0 1 0

Before this, you had two options:

1. JavaScript to add classes after render
2. Opacity and visibility hacks

Now you can simply use starting-style.

1 day ago 0 0 2 0
Illustration shows CSS transition process: starting-style, transition arrow, and final styles, highlighting smooth rendering.

Illustration shows CSS transition process: starting-style, transition arrow, and final styles, highlighting smooth rendering.

Your CSS transitions work on hover, on click, on everything... except when elements first render.

Here's the fix.

@ starting-style defines the initial state for elements appearing in the DOM. They can now transition smoothly from that state to their final styles.

1 day ago 3 0 1 0
CSS code snippet using @supports for conditional background image switching based on light and dark mode.

CSS code snippet using @supports for conditional background image switching based on light and dark mode.

You can use @ supports for progressive enhancement:

One function.
No scattered media queries.
Theme switching without the mess.

2 days ago 0 0 0 0

Browser support as of April 2026 (might be inaccurate)

โ€ข Firefox 150+ โœ… (just went stable)
โ€ข Chrome 148+ ๐Ÿงช (behind experimental flag)
โ€ข Safari โŒ (not yet)

I couldn't even find it on caniuse...

2 days ago 0 0 1 0
Code snippet displaying CSS styles for class selectors ".one" and ".two," utilizing gradients and mask images.

Code snippet displaying CSS styles for class selectors ".one" and ".two," utilizing gradients and mask images.

Here are some examples from the web-platform-tests dashboard.

2 days ago 0 0 1 0
Data table showing harness status and performance results for various background image properties across different web browsers, with some failures.

Data table showing harness status and performance results for various background image properties across different web browsers, with some failures.

It works with:

- url() for images
- linear-gradient() and radial-gradient()
- image-set() for responsive images
- Even masks and other image types

2 days ago 0 0 1 0
CSS code snippet defines background images for light and dark modes using media queries, with specified URLs for each mode.

CSS code snippet defines background images for light and dark modes using media queries, with specified URLs for each mode.

For years, switching background images between light and dark mode meant writing this.

Now you can collapse it into one line:

background-image: light-dark(url(light.png), url(dark.png));

2 days ago 0 0 1 0
Advertisement
Two boxes show a CSS theme adapting to light and dark modes, with differing background images and text colors for each theme.

Two boxes show a CSS theme adapting to light and dark modes, with differing background images and text colors for each theme.

light-dark() isn't just for colors anymore.

It now handles:

1. Images
2. Gradients
3. Image-sets

And even more.

ATTENTION: this is a super new, experimental feature that is not widely supported.

2 days ago 1 1 1 0

Haha no problem :D

2 weeks ago 0 0 0 0

WE SHOULD REMEMBER OUR HISTORY!

2 weeks ago 0 0 1 0
A chart displaying CSS at-rule support across various web browsers, with usage statistics indicating global compatibility around 96.72%.

A chart displaying CSS at-rule support across various web browsers, with usage statistics indicating global compatibility around 96.72%.

No more specificity calculations.

Where it matters:

- Managing third-party CSS libraries
- Separating framework styles from custom styles
- Working in large codebases with multiple developers

Browser support is around 96-97%.

2 weeks ago 0 0 0 0
A code snippet showing CSS layer declarations for reset, components, and utilities, with specific padding and margin styles defined.

A code snippet showing CSS layer declarations for reset, components, and utilities, with specific padding and margin styles defined.

It creates explicit layers in your CSS. Layers have priority order.

Styles in higher-priority layers always win, regardless of specificity.

Define your layers upfront, then assign styles to each layer.

The utilities layer wins over components. Components win over reset.

2 weeks ago 0 0 1 0

More specific selectors override less specific ones.

You end up with deeply nested selectors, !important everywhere, or inline styles just to make something work.

@ layer changes this.

2 weeks ago 0 0 1 0
Illustrates CSS specificity issues without `@layer` versus controlled order with `@layer`, highlighting component hierarchy and conflicts.

Illustrates CSS specificity issues without `@layer` versus controlled order with `@layer`, highlighting component hierarchy and conflicts.

Your CSS specificity wars are over.

@ layer lets you control the cascade without !important hacks.

The problem with CSS: Specificity decides what wins.

2 weeks ago 10 2 1 0
Advertisement
Color-coded scrollbars are illustrated with labels showing various colors and styles in a web design context.

Color-coded scrollbars are illustrated with labels showing various colors and styles in a web design context.

Good old days

2 weeks ago 8 0 1 0
Code snippet demonstrates CSS `@starting-style` for transitioning background color from transparent to green over 1.5 seconds.

Code snippet demonstrates CSS `@starting-style` for transitioning background color from transparent to green over 1.5 seconds.

๐Ÿ†• Animate elements from display: none

CSS `@starting-style` lets you define the initial style for elements entering the page, enabling enter animations without JavaScript.

โ‹… Combine with transition
โ‹… Works with popover and dialog

Learn more ๐Ÿ‘‡
developer.mozilla.org/en-US/docs/...

3 weeks ago 74 10 0 1
A blog post discusses the relevance of the inert HTML attribute, highlighting its ongoing utility in accessibility despite evolving technology.

A blog post discusses the relevance of the inert HTML attribute, highlighting its ongoing utility in accessibility despite evolving technology.

Good UX ๐Ÿ‘

3 weeks ago 6 0 0 0

Still a lot to do, but hopefully getting there.

3 weeks ago 0 0 0 0
Post image

4. corner-shape: squircle on images when supported (with a higher border-radius to make it more prominent)
5. Keeping an eye on text contrast
6. Images generated specifically to demonstrate each property (in the case of highlighting the wine, book, phone, candle, and overall scene)

3 weeks ago 0 0 1 0
Video

Cooking the landing page for my CSS book.

The small details that matter:

1. Code samples and results visible right there
2. Tab navigation & focus for better accessibility
3. Showing badges whether the properties work in your browser

3 weeks ago 5 0 1 0

hmm, maybe

input:invalid {
caret-color: red;
}

in case of invalid values

3 weeks ago 0 0 0 0

Well, we can always check the end result I believe...?

3 weeks ago 0 0 0 0
Advertisement
A table displaying browser compatibility and usage for the color-mix() function across various platforms and versions.

A table displaying browser compatibility and usage for the color-mix() function across various platforms and versions.

The color space matters โ˜๏ธ

Using oklab gives you perceptually better results. Mixing in sRGB can look worse.

Browser support is around ~92.5%.

One base color.
As many variations as you need.
All calculated in CSS.

3 weeks ago 0 0 0 0
A grid displaying color swatches organized by shades and hues, labeled with color names and numeric values.

A grid displaying color swatches organized by shades and hues, labeled with color names and numeric values.

Where it actually saves time:
- Generating hover/active states automatically
- Building entire color ramps from one base color
- Theming without maintaining dozens of variables

You can generated stuff like this for example.

3 weeks ago 1 0 1 0
Code snippet showing a CSS class for button background using color-mix with a specific color and black.

Code snippet showing a CSS class for button background using color-mix with a specific color and black.

Or you can also create darker versions by mixing with black.

3 weeks ago 0 0 1 0
Code snippet shows a CSS class defining a button background using the color-mix function in the oklab color space.

Code snippet shows a CSS class defining a button background using the color-mix function in the oklab color space.

Here how it works:

Blends two colors together in a specific(!) color space.

No more manual color picking or pre preprocessors usage (remember darken/lighten functions?).

For example, creating a lighter variation.

That mixes your brand blue with 20% white. Instant lighter shade.

3 weeks ago 0 0 1 0
Three overlapping circles represent color mixtures in the OKLab color space: blue, pink, and green with various combinations labeled.

Three overlapping circles represent color mixtures in the OKLab color space: blue, pink, and green with various combinations labeled.

Your design system has 47 color tokens.

But most of them are just... variations of 3 base colors.

color-mix() in CSS generates all those shades from one source.

3 weeks ago 7 2 2 1