Email or username:

Password:

Forgot your password?
36 posts total
Adam Argyle

I wrote a new article: “Indirect Cyclic Conditions: Prototyping Parametrized CSS Mixins”

kizu.dev/indirect-cyclic-condi

In my quest to push forward what is possible with custom properties in #CSS, I discovered another application of cyclic dependencies. Combined with a prior technique based on custom cascade layers, we are now even closer to something that resembles native CSS mixins.

A photo of the screen, zoomed onto a scheme that shows several blocks with solid and dashed arrows going between them. Most of the photo is out of focus, with the `--resize3` visible in the middle.
Show previous comments
Dennis Frank

@kizu Thanks! What a xmas gift! Looking forward to explore your techniques in the coming days. ”Please do not apply this technique in production“ – well… we'll see about that 😅

Mayank

@kizu this is so cool! a third of the way into your article, i was already thinking about the ways it could be used in production. and then that Firefox bug had to be there 😔

thank you for all the work you put into this!

Christopher Kirk-Nielsen

@kizu Okay I had to read the examples a couple times but now I understand it (the quote from the spec helped — who'd have thought! :D). This is really, really clever, and interesting. Thank you for sharing, and happy holidays!

Adam Argyle

#CSS color

what's the difference between adjusting lightness, adding white, and adding black?

feel it out, here in this Codepen

column
1: from color to 100% lightness
2: from color to white
3. from color to black
4. from color to 0% lightness

codepen.io/argyleink/pen/GgKWJ

Oddbjørn Øvernes

@argyleink The mix-solution gets rid of chroma "for free", but you don't control the curve! Relatedly, I wish you could do stuff like `calc(sin(l * pi) * c)` in rcs, but this crashes the browser😅. However it works fine if "l" is replaced with an external var(--l) 🤷
(example: codepen.io/Oddbj-rn-vernes/pen )

Adam Argyle

Putting AI in your product? You're gonna need #CSS gradient text animations (if you want to be cool)

So here, a recipe!
codepen.io/argyleink/pen/vEBmZ

nerdy.dev/animated-gradient-te

Amadeus Maximilian

@argyleink surprise surprise, it doesn’t work on iOS Safari. 🙄

Really cool effect when it does work though. 😊

Adam Argyle

Wildest #CSS media query I've written in a while

`@container (inline-size >= calc(100cqi - 120px))`

yep, `calc()` in a MQ!

WHY?
to re-anchor buttons to be "inside" when space is tight

Video:
purple outline's are containers, buttons adapt to containers or the page

nerdy.dev/carousel-adaptive-an

Adam Argyle

Safari Technology Preview 210 has some nice features:

- `::details-content` (see developer.chrome.com/blog/styl)

- Preview support for Scroll-Driven Animations (see scroll-driven-animations.style)

This is only a personal selection. Full changelog: webkit.org/blog/16406/release-

Adam Argyle

🔥 Remember Internet Explorer’s Page Transitions? THEY’RE BACK BABY!

👾 Demo: ie-page-transitions.netlify.ap
⌨ Repo: github.com/bramus/ie-page-tran

To configure these, use the meta tags from the olden days + load up the library.

Works in IE 5.5–7.0, Chrome 126+, and Safari 18.2 (buggy).

Adam Argyle

CSS Wrapped 2024 is here!

Just like last year, we – the Chrome DevRel team – have published CSS Wrapped, our end of year overview covering many of the new #CSS and Web UI features that landed in Chrome and The Web Platform in 2024.

👉 chrome.dev/css-wrapped-2024/ is the place to be!

niu tech

@bramus The website is broken in Angelfish web browser on Sailfish OS. Please provide at least a basic fallback stylesheet for older browsers.

Adam Argyle

Do you ever use CSS Scroll Snap?

It's awesome, and there's even a Level 2 version of the spec coming with a `:snapped` pseudo selector and `scrollsnapchange` and `scrollsnapchanging` events. 🎉

Have you tried it on the <html> element though? It should work, but there's a host of issues.

Todays wish is for Safari to improve support for CSS Scroll Snap on the <html> element.

johannesodland.github.io/2024/

Adam Argyle

🎁 Psst... Day 1 is tomorrow (or perhaps later today? Timezones and such)!

12daysofweb.dev

Tell your friends!

Krzysztof Hankiewicz (he/him)

@5t3ph The link for today doesn't seem to work, at least on mobile.

Adam Argyle

@fcalderan gets even easier with scroll-state(sticky) queries!

```css
.stuck-top {
container-type: scroll-state;
position: sticky;
top: 20px;

> nav {
transition:
box-shadow .3s var(--ease-3),
margin .3s var(--ease-3),
border-radius .3s var(--ease-3);

@container scroll-state(stuck: top) {
box-shadow: var(--shadow-5);
border-radius: 10px;
margin: 20px;
}
}
}
```
try them in Canary: codepen.io/argyleink/pen/vYPzd

article out soon!

@fcalderan gets even easier with scroll-state(sticky) queries!

```css
.stuck-top {
container-type: scroll-state;
position: sticky;
top: 20px;

> nav {
transition:
box-shadow .3s var(--ease-3),
margin .3s var(--ease-3),
border-radius .3s var(--ease-3);

@container scroll-state(stuck: top) {
box-shadow: var(--shadow-5);
border-radius: 10px;
margin: 20px;
}
}
}
```
try them in Canary: codepen.io/argyleink/pen/vYPzd

lbineau

@argyleink @fcalderan finally! Is it a chrome only feature or other browsers plan to implement it too?

Adam Argyle

UI Workshop

✅ scroll driven animations
✅ view transitions
✅ popovers
✅ container queries

nerdy.dev/i-put-a-workshop-on-

Adam Argyle

rebeccapurple won by a long shot 💜

voting is closed.
a new repo appears.
what's next?

nerdy.dev/a-community-css-logo

Max Duval

@argyleink I was just re-reading the MDN docs on why there will not be CSS4… what’s changed?

“There will never be a CSS3 or a CSS4; rather, everything is now just "CSS" with individual CSS modules having version numbers.”

developer.mozilla.org/en-US/do

Adam Argyle

proposed a #CSS `scroll-state` query for easily knowing which direction the user is scrolling

want it?
have additional use cases?

**give it a vote or comment!**

github.com/w3c/csswg-drafts/is

Go Up