You probably want CSS-Tricks

Are we in a new era of web design? What do we call it?

Written by: Chris Coyier

Una is calling it the new responsive. A nod to the era we were most certainly in, the era of responsive design. Where responsive design was fluid grids, flexible media, and media queries, the new responsive is those things too, but slotted into a wider scope: user preference queries, viewport and form factor, macro layouts, […]

Continue reading "Are we in a new era of web design? What do we call it?" at CSS-Tricks

How to Create CSS Charts With Interesting Shapes, Glyphs and Emoji

Written by: Preethi

Let’s forego the usual circles and bars we typically see used in charts for more eccentric shapes. With online presentations more and more common today, a quick way to spruce up your web slides and make them stand out is to give the charts a shapely makeover 🪄 I’ll show you how to create charts […]

Continue reading "How to Create CSS Charts With Interesting Shapes, Glyphs and Emoji" at CSS-Tricks

Using the `outline` Property as a Collapsable Border

Written by: Carter Li

The outline property in CSS draws a line around the outside of an element. This is quite similar to the border property, the main exception being that outline isn’t a part of the box model. It is often used for highlighting elements, for example, the :focus style. In this article, let’s put a point on […]

Continue reading "Using the `outline` Property as a Collapsable Border" at CSS-Tricks

Links on Typography

Written by: Chris Coyier

I studied the fonts of the top 1000 websites. Here’s what I learned. — Michael Li brings the data. San-serif has total dominance. “[…] it is rare to go below 10px or above 24px.” And poor <h5> always being the same size as <p>. Makes me feel extra sad for <h6>, are you destined to […]

Continue reading "Links on Typography" at CSS-Tricks

Perfect Tooltips With CSS Clipping and Masking

Written by: Louis Hoebregts

Clipping and masking have been around for a while now in CSS and even have pretty decent browser support. I recently worked on a project that needed to use a clipping technique for tooltips showing above links in text.

Continue reading "Perfect Tooltips With CSS Clipping and Masking" at CSS-Tricks

Start Serving Optimized Images in Vue

Written by: ImageEngine

Images have become extremely important to the effectiveness of websites. They speak a 1000 words, attract attention, and stimulate emotions. However, web performance is also a growing problem for most websites. And images are at the heart of many web performance issues. According to HTTP Archive, images are at least 50% of total website payloads.

Continue reading "Start Serving Optimized Images in Vue" at CSS-Tricks

Inline Styles as Classes (lol)

Written by: Chris Coyier

If you’re abhorred by using inline styles, just move that style to the class attribute! And then make sure you have CSS in place that, ya know, does what it says on the box. OK lemme dig in and totally ruin the joke. First off, it’s a joke, so don’t actually do this. I don’t […]

Continue reading "Inline Styles as Classes (lol)" at CSS-Tricks

Useful and Useless Code Comments

Written by: Chris Coyier

Jim Nielsen: If somebody says a comment isn’t adding any value, I would ask: to whom? Personally, I’ve never liked the advice that writing obvious comments is bad practice—probably because I write obvious comments all the time. Jim showed off some examples of “code comments that are at the same level of fidelity as the […]

Continue reading "Useful and Useless Code Comments" at CSS-Tricks

How I Used the WAAPI to Build an Animation Library

Written by: Okiki Ojo

The Web Animations API lets us construct animations and control their playback with JavaScript. The API opens the browser’s animation engine to developers and was designed to underlie implementations of both CSS animations and transitions, leaving the door open to future animation effects. It is one of the most performant ways to animate on the […]

Continue reading "How I Used the WAAPI to Build an Animation Library" at CSS-Tricks

Detect Unused Classes in… HTML

Written by: Chris Coyier

Usually, when “unused” comes up in conversation regarding CSS, it’s about removing chunks of CSS that are not used in your site or, at least, the styles not currently in use on a specific page. The minimal amount of CSS is best! I’ve written about how this is a hard problem in the past. In […]

Continue reading "Detect Unused Classes in… HTML" at CSS-Tricks

Media Queries in Times of @container

Written by: Chris Coyier

Max Böck took me up on my challenge to look through a codebase and see how many of the @media queries could ultimately become @container queries. I took the bait and had a look at some of my projects – and yes, most of what I use @media for today can probably be accomplished by @container at some point. […]

Continue reading "Media Queries in Times of @container" at CSS-Tricks

Just How Niche is Headless WordPress?

Written by: Chris Coyier

I wonder where headless WordPress will land. And by “headless” I mean only using the WordPress admin and building out the user-facing site through the WordPress REST API rather than the traditional WordPress theme structure. Is it… big? The future of WordPress? Or relatively niche?

Continue reading "Just How Niche is Headless WordPress?" at CSS-Tricks