Play Windows Solitaire (1990) in pure #CSS. This uses random(), view timelines, bitpacking, and no JavaScript! 🃏 Try it: codepen.io/editor/alowp...
You (and Claude) have been styling pill buttons wrong all along. Fair warning: this one gets VERY nerdy 🤓 Round ends steal space from the text and push the icon off-center. Here
Typographers. I really want this to stop. Type scale generators that hand back 3.815rem headings, 1.563rem subheads and a 0.64rem caption nobody can read, all from a ratio borrowed from music theory. Plenty of design systems still ship numbers like these, three decimal places and all. JFC
Stu created tidy-typography.css: a style reset for taming typography with modern CSS features for everything from fluid typography and vertical rhythm, to hyphens and variable fonts.
CSS tip: recolor every checkbox, radio and range slider with one line. :root { accent-color: #EA580C; } No custom markup, no hidden inputs. The browser even picks a readable checkmark color for you.
The text-box-trim and text-box-edge properties in CSS enable developers to trim specifiable amounts of the whitespace that appear above the
After 12 years, Scroll-Driven Animations are officially Baseline Newly Available 🎉 Pure CSS scroll-driven animations work across every major browser engine! Celebrate this milestone with our animated timeline tracing the feature's history since 2014 → goo.gle/3Urm9fT
Declan Chidlow explores new HTML and CSS features that can make your design system more flexible, adaptable, and maintainable.
It’s annoying when your browser zooms if a button is rapidly tapped. There’s actually a really simple fix and no, you don’t have to prevent all zooming with a meta tag!
Wiring HTML attributes into CSS with advanced typed attr(), and letting container style queries pass that state down to child components.
Normal text wrapping can leave big gaps in your container, which can become even more exaggerated with the new-ish CSS values of text-wrap: balance and text-wrap: pretty. You almost certainly want …
✨ Neat CSS trick ✨ We can use `width: fit-content` to have a container element shrink to fit its element's width. This is useful for cards! But if that card has any text content, that text will blow out the width of the card, since it won't automatically linewrap. So we wind up with this issue:
Fun CSS demo I built today: automatically compute a partially transparent white or black color that meets a target WCAG contrast ratio against an arbitrary background color. No JavaScript needed. 😃 https://codepen.io/editor/devongovett/pen/01a01b37-313f-72d7-849a-147f6126ad94
Because I always use unitless values for line-height, I had always, incorrectly, assumed that it worked the same way as using % would... turns out I was wrong!
uhh… TIL: <marquee direction="down" behavior="alternate"> <marquee behavior="alternate">This text will bounce</marquee> </marquee> https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/marquee#examples
Premium courses, articles, links and newsletters that give you a real-world, industry specific education that actually matters and that will far outlive any hype and help you level up your career.
Combine three new CSS features to build fully adaptive themed components.
Design a modular type scale, preview it live, and copy production-ready CSS with optional fluid typography.
One line of CSS. Perfectly responsive typography on every screen. font-size: clamp(1rem, 1vw, 1.75rem); 🪄 1rem minimum keeps text readable on phones 🪄 1vw makes it scale fluidly with the viewport 🪄 1.75rem caps it elegantly on large displays No media queries or breakpoints. Try it!
Publishing pixel art on the web? Don't let it get blurred and smushed. Apply the `image-rendering: crisp-edges` CSS property. Alternatively, export your pixel art at a higher resolution, so each visual pixel is made of many pixels, minimising impact from scaling and compression. #PixelArt #CSS
Exploring the math and intuition behind blend modes in the browser
CSS Color Module 4 adds oklch(), and we gain P3 wide-gamut support, boost code readability, and improve developer-designer communication.
Does your system for naming colors always feel like it falls short? This two-layer approach solves so many problems!
One CSS property just killed every auto-resize textarea script you've ever written. Seriously, one line. The property is field-sizing: content
@eva.town hi! I really like what you did with hypertext.tv - how did you create that old school pixelated effect? https://hypertext.tv/
CSS masonry (aka grid-lanes) has two orientations: rows and columns. I'm trying to think of good metaphors... Row is easy: a brick wall, that's where the masonry term comes from. Column: many call it waterfall, but trying to put it into an image doesn't work. Motorway works a lot better.
No more magic numbers with this modern CSS feature (I'll save the clickbait for YT, it's anchor positioning... though it does look like it's in the thumbnail too 😁) https://youtube.com/shorts/k330_RUaSIE
AT Garden Club - A decentralized CSS showcase where contributors own their data. Inspired by CSS Zen Garden, powered by the AT Protocol. Submit your stylesheet today!
How to adjust perceived font weight in dark mode without layout shift