Top 11 CSS Tricks Every Web Developer Should Know, by (not on Mastodon or Bluesky):
#css #customproperties #layout #animations #selectors #positioning #darkmode #resets #tipsandtricks
Top 11 CSS Tricks Every Web Developer Should Know, by (not on Mastodon or Bluesky):
#css #customproperties #layout #animations #selectors #positioning #darkmode #resets #tipsandtricks
Making Context-Aware Components: How CSS “inherit()” Could Simplify Design Systems, by @sturobson:
https://www.alwaystwisted.com/articles/making-context-aware-components

Make your components context-aware with CSS inherit(): learn how the new inherit() function lets components derive spacing, colour and motion from their container, reduce token bloat, and implement robust fallbacks for browsers that don’t yet support the feature. Practical card examples included.
#Development #Techniques
Custom properties in media queries? · A workaround powered by modern CSS https://ilo.im/1675st
_____
#ModernCSS #MediaQueries #ContainerQueries #StyleQueries #CustomProperties #Browser #WebDev #Frontend #CSS

One of the most frustrating aspects of media queries is that we can’t use custom properties with them. This often results in hard-coded values in otherwise, highly configurable codebases. Manuel has a novel approach to get around this.
#Development #Approaches
The best CSS unit for spacing · “We don’t have to choose between px and rem.” https://ilo.im/1673zo
_____
#CssUnits #CssClamp #CssCalc #CustomProperties #WebDev #Browser #Frontend #CSS
#Development #Approaches
The double focus ring problem · A smart solution built with modern CSS https://ilo.im/166zfq
_____
#ModernCSS #Themes #Accessibility #Keyboard #FocusRing #CustomProperties #WebDev #Frontend #HTML #CSS
#Development #Approaches
Automatic dark mode · A solid technique with web component support https://ilo.im/166xyi
_____
#DarkMode #CSS #CustomProperties #JavaScript #WebComponents #ShadowDOM #DesignTokens #WebDev #Frontend
#Development #Techniques
CSS elevator · A pure CSS state machine with floor navigation https://ilo.im/166hlb
_____
#Elevator #StateMachine #Accessibility #WebDev #Frontend #HTML #CSS #CustomProperties #CssClamp #Techniques

In this article, author Chris Sabourin walk through how modern CSS features can build a fully functional, interactive elevator that knows where it is, where it’s headed, and how long it’ll take to get there. No JavaScript required.
You really don’t have to put your CSS custom properties in :root {}
#Development #Introductions
Rolling the dice with CSS random() · Native random numbers are coming to CSS https://ilo.im/166bac
_____
#ModernCSS #Randomness #CssFunction #CustomProperties #Safari #Browser #WebDev #Frontend #CSS
Little Reminder About Custom Properties with Invalid Values