Search
In Praise of Shadows
12.7.2022
Our dear friend Robin has a new essay called In Praise of Shadows. Now, before you hop over there looking for nuggets on CSS box shadows, text shadows, and shadow filters… this is not that. It’s an essay …
In Praise of Shadows originally published on CSS-Tricks. You should...
Beyond Media Queries: Using Newer HTML & CSS Features for Responsive Designs
4.9.2020
Beyond using media queries and modern CSS layouts, like flexbox and grid, to create responsive websites, there are certain overlooked things we can do well to make responsive sites. In this article, we’ll dig into a number tools (revolving around HTML and CSS) we have at the ready, from responsive...
How to Make a Media Query-less Card Component
1.9.2020
Fun fact: it’s possible to create responsive components without any media queries at all. Certainly, if we had container queries, those would be very useful for responsive design at the component level. But we don’t. Still, with or without container queries, we can do things to make our components...
Centering a div That Maintains Aspect-Ratio When There’s Body Margin
18.2.2020
Andrew Welch had a little CSS challenge the other day to make an ordinary div:
• centered vertically + horizontally• scales to fit the viewport w/ a margin around it• maintains an arbitrary aspect ratio• No JS
There's a video in that tweet if it helps you visualize the challenge. I saw Paul...
Adaptive Photo Layout with Flexbox
3.10.2019
Let’s take a look at a super lightweight way to create a horizontal masonry effect for a set of arbitrarily-sized photos. Throw any set of photos at it, and they will line up edge-to-edge with no gaps anywhere.
The solution is not only lightweight but also quite simple. We’ll be using an unordered...