September 1, 2022 Those of you who have been reading CSS-Tricks for a while may remember that we used to publish a little thing we called CSS-Tricks Chronicles. Our friend Chris Coyier would write up a reflection from the past couple of months or so, and it was a great way to get a pulse on what’s happening […]
Read more ⟶ September 1, 2022 A screen reader is an important accessibility tool for people with no or limited vision. People who are blind or those with low vision can use a screen reader to navigate the computer. Screen readers will read contents on the screen and explain to the user what is on the page. Screen readers allow people […]
Read more ⟶ September 1, 2022 Ahmad Shadeed got an early jump on container queries and has a growing collection of examples based on everyday patterns.
Read more ⟶ August 30, 2022 We can make variables in CSS pretty easily: And we can declare them on any element:
Read more ⟶ August 26, 2022 Whenever we build simple or complex layouts using CSS Grid, we’re usually positioning items with line numbers. Grid layouts contain grid lines that are automatically indexed with positive and negative line numbers (that is unless we explicitly name them). Positioning items with line numbers is a fine way to lay things out, though CSS Grid […]
Read more ⟶ August 25, 2022 Neither do I! And that’s probably because there’s a lot happening in WordPress-land. The evolution towards full-site editing (FSE) introduces frequent changes to the way we build themes and plugins, and at such break-neck speed that the documentation itself is either non-existent or nearly stale upon being published. Heck, the term “full-site editing” might even […]
Read more ⟶ August 24, 2022 If a utility class only does one thing, chances are you don’t want it to be overridden by any styles coming from elsewhere. One approach is to use !important to be 100% certain the style will be applied, regardless of specificity conflicts. The Tailwind config file has an !important option that will automatically add !important […]
Read more ⟶ August 23, 2022 The GOV.UK team recently published “How and why we removed jQuery from GOV.UK“. This was an insightful look at how an organization can assess its tooling and whether something is still the best tool for the job. This is not a nudge to strip libraries out of your current project right now! Many of us […]
Read more ⟶ August 22, 2022 Alright, so the last time we checked in, we were using CSS Grid and combining them with CSS clip-path and mask techniques to create grids with fancy shapes. Here’s just one of the fantastic grids we made together:
Read more ⟶ August 18, 2022 That ain’t rhetorical: I’m really interested in finding great use cases for CSS multi-column layouts. The answer seems straightforward. Use columns when you want to split any content into columns, right? Here is generally the sort of example you’ll find in articles that show how CSS mutli-column layouts work, including our very own Almanac:
Read more ⟶ August 17, 2022 If the thought of handwriting code seems silly, it might surprise you to know that it’s inevitable. If you’re unsure, think about the last job interview you did, and remember how there was no computer around in the interview room — just your interviewers, a blank sheet of paper, and a blue ball-point pen. For […]
Read more ⟶ August 15, 2022 In a previous article, I looked at CSS Grid’s ability to create complex layouts using its auto-placement powers. I took that one step further in another article that added a zooming hover effect to images in a grid layout. This time, I want to dive into another type of grid, one that works with shapes.
Read more ⟶ August 11, 2022 If you use VS Code, you might have enabled the setting for re-opening a previously open file next time the app launches. I do. I like that.
Read more ⟶ August 10, 2022 Designing a beautiful “article” is wrought with tons of considerations. Unlike, say, a homepage, a long-form article is less about designing an interface than it is designing text in a way that creates a relaxed and comfortable reading experience. That’s because articles deal with long-form content which, in turn, tends to be valued by a […]
Read more ⟶ August 9, 2022 The time for CSS-Tricks is over. Now is the time for CSS Crimes! In this current landscape of content service providers, users are often limited to expressing themselves in text, links, and images. Sanitization rules tend to strip out HTML, JavaScript, and various attributes. Social media service Cohost allows users to have greater freedom with […]
Read more ⟶ August 8, 2022 Creating a grid of images is easy, thanks to CSS Grid. But making the grid do fancy things after the images have been placed can be tricky to pull off. Say you want to add some fancy hover effect to the images where they grow and zoom beyond the rows and columns where they sit? […]
Read more ⟶ August 5, 2022 CSS Scroll Snap allows websites to snap the web page or any other scroll container to a specific scroll position when the user performs a scrolling operation. This feature has been supported in all modern browsers for over two years, but many websites that could benefit from it are still not using it. Scroll snapping […]
Read more ⟶ August 4, 2022 Apple unveiled an expanded version of its San Francisco system font at WWDC 2022. Then, last month, Jim Nielsen zeroed in on the font’s variations, explaining how the font provides a spectrum of variations based on the width and weight. It’s a remarkable read if you haven’t checked it.
Read more ⟶ August 4, 2022 With speech interfaces becoming more of a thing, it’s worth exploring some of the things we can do with speech interactions. Like, what if we could say something and have that transcribed and pumped out as a downloadable PDF? Well, spoiler alert: we absolutely can do that! There are libraries and frameworks we can cobble […]
Read more ⟶ August 2, 2022 Dave Rupert with some modern CSS magic that tackles one of those classic conundrums: what happens when the CSS for component is unable to handle the content we throw at it? The specific situation is when a layout grid expects an even number of items, but is supplied with an odd number instead. We’re left […]
Read more ⟶