CSS by T. Afif

CSS by T. Afif

@css-only.dev

CSS stuff by Temani Afif

6.9K followers95 following1.1K posts

CSS by T. Afif reposted

Easiest new subscription I ever signed up for.

CSS-Tricks*@css-tricks.com

CSS-Tricks has a new owner! Yes, I've got the keys to the castle, so to speak. And, even after 12 years of working on the site, I'll admit I'm a little overwhelmed and nervous about that. https://css-tricks.com/css-tricks-has-a-new-owner/

The perfect feature for my links-only profile! 😁 Don't hesitate to click the green buttons 👀

Bluesky@bsky.app

v1.136 is live! Introducing: Profile links We want independent writers, artists, developers, and creators to be able to build and fund sustainable projects on Bluesky. Help your followers know how to support you by adding buttons for Patreon, Ko-fi, your newsletter or website, and more.

More range sliders with fancy shapes? Let's go! This time with a tooltip showing the value. curve, wave, zig-zag, arc ... Which one do you prefer? css-tip.com/shaped-range... 0% JavaScript and 100% CSS magic (border-shape, shape(), scroll-driven animations, and more!)

CSS by T. Afif@css-only.dev

Who said range sliders need to be straight and boring?! Hey CSS, distort the line! 〰️ css-tip.com/wiggly-range... Another funny demo powered by border-shape, scroll-driven animations, and more The HTML code? Only an input element (no extra code is needed)

CSS by T. Afif reposted

Yesterday, the CSSWG accepted my proposal for mesh gradients and diffusion curve gradients! Want to make gradients like this natively in CSS? Well, we've started the work on it. It's coming! Here's the Explainer: github.com/w3c/csswg-dr...

CSS by T. Afif reposted

💡CSS Tip! Creating CSS Shapes is one of my favorite tasks, and now I can do something even better: Random CSS Shapes! Let's start with Blobs. css-tip.com/random-blob/ You never see the same shape twice. A unique shape for a unique experience! 👀

CSS by T. Afif reposted

💡 CSS Tip! Another cool shape that works well with random(): wavy dividers! css-tip.com/random-wavy-... Each visitor gets their own wavy shape for a unique experience.

CSS by T. Afif@css-only.dev

💡CSS Tip! Creating CSS Shapes is one of my favorite tasks, and now I can do something even better: Random CSS Shapes! Let's start with Blobs. css-tip.com/random-blob/ You never see the same shape twice. A unique shape for a unique experience! 👀

💡 CSS Tip! Another cool shape that works well with random(): wavy dividers! css-tip.com/random-wavy-... Each visitor gets their own wavy shape for a unique experience.

CSS by T. Afif@css-only.dev

💡CSS Tip! Creating CSS Shapes is one of my favorite tasks, and now I can do something even better: Random CSS Shapes! Let's start with Blobs. css-tip.com/random-blob/ You never see the same shape twice. A unique shape for a unique experience! 👀

CSS by T. Afif reposted

📝 New CSS Article! With Scroll-Driven Animations, you can transfer a value from one element to another anywhere on the page. I am using it to implement children-count(). Strange? Confusing? What the heck am I talking about?! Read my latest article 👇 blog.master.dev/transferring...

blog.master.devTransferring sibling-count() to a Parent ElementDiscover how to count children in CSS using hacks with Scroll-Driven Animations. Learn techniques to transfer values effectively!

📝 New CSS Article! With Scroll-Driven Animations, you can transfer a value from one element to another anywhere on the page. I am using it to implement children-count(). Strange? Confusing? What the heck am I talking about?! Read my latest article 👇 blog.master.dev/transferring...

blog.master.devTransferring sibling-count() to a Parent ElementDiscover how to count children in CSS using hacks with Scroll-Driven Animations. Learn techniques to transfer values effectively!

CSS by T. Afif reposted

Based on some @css-only.dev feedback 💙

CodePen@codepen.io

✂️ 🌆 Image cropping everywhere! You can now crop an image in the Asset Manager (which opens in both 2.0 and the Classic Editor) and directly in the 2.0 editor.

CSS by T. Afif reposted

✂️ 🌆 Image cropping everywhere! You can now crop an image in the Asset Manager (which opens in both 2.0 and the Classic Editor) and directly in the 2.0 editor.

CSS by T. Afif reposted

💡 CSS Tip! Want to know how many children your container has? We don't have children-count() yet, but we can implement it using modern CSS! css-tip.com/children-cou... A hacky experiment powered by Scroll-Driven Animations. How would you use it? Share your use cases 👇

💡 CSS Tip! Want to know how many children your container has? We don't have children-count() yet, but we can implement it using modern CSS! css-tip.com/children-cou... A hacky experiment powered by Scroll-Driven Animations. How would you use it? Share your use cases 👇

a11y question: Let's suppose I have an empty html element somewhere on the page with 0 content, invisible, having position:absolute (or fixed). It has no purpose in the HTML (only used for some CSS stuff). Is it a good idea to add the "inert" attribute? Or should I do nothing?

CSS by T. Afif reposted

The time to ramp up your scroll-driven animations skills is **NOW** Go check scroll-driven-animations.style for and free 10-part video course created by yours truly, as well as a bunch of tools and demos.

scroll-driven-animations.styleScroll-driven AnimationsA bunch of demos and tools to show off Scroll-driven Animations

I thought random() will be enabled by default with the today release of Chrome (the V154) but I was wrong 😑 It's for the next version in two weeks (the V155). You can always enable the experimental flag to see the demo (or use Firefox Nightly as well)

CSS by T. Afif reposted

CSS by T. Afif reposted

📝 New CSS Article! Learn how I used Scroll-Driven Animations and other modern features to extract various information from a CSS grid. blog.master.dev/extracting-g... Another article to show that CSS is more than a simple set of properties/values.

blog.master.devExtracting Grid Information Using CSSIt's an interesting and potentially useful trick to have an element know where it is on a grid. That's tricky enough when the items are in one row/column, but what about when they span?
CSS by T. Afif@css-only.dev

Getting information from a simple grid is good, but what about a complex one where the items are randomly placed? 👀 css-tip.com/grid-informa... A fancy demo powered by Scroll-Driven Animations and more! All the values are calculated and displayed using only CSS.

📝 New CSS Article! Learn how I used Scroll-Driven Animations and other modern features to extract various information from a CSS grid. blog.master.dev/extracting-g... Another article to show that CSS is more than a simple set of properties/values.

blog.master.devExtracting Grid Information Using CSSIt's an interesting and potentially useful trick to have an element know where it is on a grid. That's tricky enough when the items are in one row/column, but what about when they span?
CSS by T. Afif@css-only.dev

Getting information from a simple grid is good, but what about a complex one where the items are randomly placed? 👀 css-tip.com/grid-informa... A fancy demo powered by Scroll-Driven Animations and more! All the values are calculated and displayed using only CSS.

CSS by T. Afif reposted

We should have been writing articles and having fun with CSS, but instead... We can't do much against big corporations (except wait), so let's give Geoff some support. Share (or try) his HTML/CSS course: thebasics.dev 100% human-made by the one who edited 86945 CSS articles!

We should have been writing articles and having fun with CSS, but instead... We can't do much against big corporations (except wait), so let's give Geoff some support. Share (or try) his HTML/CSS course: thebasics.dev 100% human-made by the one who edited 86945 CSS articles!

CSS by T. Afif reposted

CSS by T. Afif reposted

#CSS `progress()` is now baseline! 🥳 I was trying to see if this could be used as a workaround for the lack of typed arithmetic (unit division) in Firefox, and it does work, sort of. codepen.io/editor/maike... (And yes I know there's already the `tan2(atan())` trick, but that has its own bugs.)

codepen.ioCSS typed arithmetic using progress()A code demo by Maikel Krause created on CodePen
Firefox for Web Developers@webdevs.firefox.com

Major versions of Firefox now land every two weeks, so Firefox 155 dropped today with web platform features including: 🎉 Fully typed CSS attr() 🎉 CSS progress() 🎉 Promise.allKeyed() and allSettledKeyed() 🎉 Lots of new WebTransport stuff …And more! developer.mozilla.org/en-US/docs/M...

It's not a competition, but border-shape is actually the second most upvoted feature, close to 100 thumbs up! Can we make it the first?! 👀 Cast your vote 👇

CSS by T. Afif@css-only.dev

Go vote for the border-shape feature. It should be part of Interop 2027! I have a lot of cool demos waiting for better browser support (that I will share anyway in 2026 😅) github.com/web-platform...