Compat 2021 Holiday Update: presents for developers before the end of the year
CSS
Responsive iframes with the CSS aspect-ratio property
Today, I want to show you can use a few lines of CSS to make your embedded iframes fully responsive. Let’s dig in!
The challenge with iframes and responsive layouts Unlike images and the native HTML5 video element, iframes do not scale responsively by default.
/** * This does NOT work */ iframe { max-width: 100%; height: auto; } Years back, Dave Rupert put together a great video showing the challenge with responsive iframe videos.
The CSS :has() selector is way more than a “Parent Selector”
Safari TP 137 just dropped with unflagged support for :has(). Often dubbed "the parent selector", :has() is way more than that …
The surprising behavior of "important CSS custom properties"
The '!important` keyword is removed when using custom properties as CSS property values.
The State of CSS 2021
The annual survey about the latest trends in CSS.
Defensive CSS - Ahmad Shadeed
A list of defensive CSS techniques to avoid potential future issues
CSS Shadow Palette Generator
The power of CSS attribute selectors — allround.io
Generating Shades of Color Using CSS Variables
A Guide To Modern CSS Colors With RGB, HSL, HWB, LAB And LCH — Smashing Magazine
In this article, we’ll take a look at the best ways to handle colors in CSS today, some tips for using them in a design system, and what we can expect from our colors in the not-too-distant future.
Dynamic Color Manipulation with CSS Relative Colors
Layout patterns
A collection of layout patterns built using modern CSS APIs that will help you build common interfaces such as cards, dynamic grid areas, and full-page layouts.
Using Position Sticky With CSS Grid - Ahmad Shadeed
How to make position sticky work with CSS grid items
The effect of CSS on screen readers | Use Less Divs
One last time: custom styling radio buttons and checkboxes | scottohara.me
About three years ago now (2017/2018), I published a collection of accessible styled form controls which included specific markup patterns to create custom s...
Pure CSS Custom Styled Radio Buttons | Modern CSS Solutions
Learn to create custom, cross-browser, theme-able, scalable radio buttons in pure CSS and ensuring styles remain accessible across states.
A Deep Dive Into object-fit And background-size In CSS — Smashing Magazine
In this article, we will go through how `object-fit` and `background-size` work, when we can use them, and why, along with some practical use cases and recommendations. Let’s dive in.
"Dark Mode" vs "Inverted"
One thing we run into a fair amount in our design system work is the need to clarify the difference between "dark mode" and "components rendered on a dark background".
What is actual dark mode?
prefers-color-scheme is a CSS media feature that listens to a user's preference for dark or light
Custom properties with defaults: 3+1 strategies – Lea Verou
Conditional border-radius and three future CSS features
A look at CSS features from the future: media query ranges, container queries and @when/@else.
Online CSS Analyzer - Project Wallace
Practical CSS Scroll Snapping
CSS scroll snapping allows you to lock the viewport to certain elements or locations after a user has finished scrolling. It’s great for building
Expandable Sections Within a CSS Grid
I love CSS Grid. I love how, with just a few lines of code, we can achieve fully responsive grid layouts, often without any media queries at all. I’m
CSS is Going Gosh-Darned Hog Wild, I Tell Ya What
As someone just sittin' back watching CSS evolve, it feels like we're at one of the hottest moments of innovation in CSS history. It was really something
How to understand CSS by Rachel Andrew
We often learn CSS via looking for solutions to problems: We need to create a certain layout, or a particular animation, and so we go look for the exact CSS that will make it so. Many web developers today started their careers using a framework, and so much of their experience of CSS is in tweaking the code written by someone else. Too much time is spent trying to overwrite styles, and make customizations, without an understanding of what the underlying framework is actually doing.
Native CSS nesting: What you need to know - LogRocket Blog
Native CSS will support CSS nesting. What will that look like? What are its advantages? Learn more about native CSS nesting in this post.
Understanding min-content, max-content, and fit-content in CSS - LogRocket Blog
Learn about the fit-content, min-content, and max-content.In keyword values in CSS and how to use them in real-world projects.
How To Build An Expandable Accessible Gallery — Smashing Magazine
In this article, we’ll be looking at how to set up a gallery that is expandable as well as accessible with a few tips and tricks along the way. Let’s get started!
How I Learnt To Stop Worrying And Love Animating The Box Model
Or, let's talk about accordions. 🪗
CSS Container Query Units - Ahmad Shadeed
Using units that are relative to the container size