Just How Long Should Alt Text Be? | CSS-Tricks

I teach a class over at the local college here in Long Beach and a majority of the content is hosted on the Canvas LMS so students can access it online. And, naturally, I want the content to be as accessible as possible, so thank goodness Canvas has a11y tooling built right into it. But it ain’t all that rosy. It makes assumptions like all other a11y tooling and adheres

Read More

Beautify GitHub Profile | CSS-Tricks

It wasn’t long ago that Nick Sypteras showed us how to make custom badges for a GitHub repo. Well, Reza Shakeri put Beautify GitHub Profile together and it’s a huuuuuuge repo of different badges that pulls lots of examples together with direct links to the repos you can use to create them. And it doesn’t stop there! If you’re looking for some sort of embeddable widget, there’s everything from GitHub

Read More

Customizing Color Fonts on the Web | CSS-Tricks

Myles C. Maxfield on the WebKit Blog published a nifty how-to for color fonts. It comes on the heels of what Ollie wrote up here on CSS-Tricks the other day, and while they cover a lot of common ground, there’s some nice nuggets in the WebKit post that make them both worth reading. Case in point: there’s a little progressive enhancement in there using @supports for older browsers lacking support

Read More

Mastering SVG’s stroke-miterlimit Attribute | CSS-Tricks

So, SVG has this stroke-miterlimit presentation attribute. You’ve probably seen it when exporting an SVG from a graphic editor program, or perhaps you find out you could remove it without noticing any change to the visual appearance. After a good amount of research, one of the first things I discovered is that the attribute works alongside stroke-linejoin, and I’ll show you how as well as a bunch of other things

Read More

First Look At The CSS object-view-box Property | CSS-Tricks

Ahmad Shadeed — doing what he always does so well — provides an early look at the object-view-box property, something he describes as a native way to crop an image in the browser with CSS. The use case? Well, Ahmad wastes no time showing how to use the property to accomplish what used to require either (1) a wrapping element with hidden overflow around an image that’s sized and positioned

Read More

Verevolf | CSS-Tricks – CSS-Tricks

Zeldman: You may not know his name, but he played a huge part in creating the web you take for granted today. And he’s back—kind of. That would be Glenn Davis and the Verevolf site Zeldman’s talking about. The site is a growing archive of Davis’s personal (and unvarnished) recollections pioneering the early web, like the one where he recounts the origin story of his uber-famous Cool Site of the

Read More

Inline Image Previews with Sharp, BlurHash, and Lambda Functions | CSS-Tricks

Don’t you hate it when you load a website or web app, some content displays and then some images load — causing content to shift around? That’s called content reflow and can lead to an incredibly annoying user experience for visitors. I’ve previously written about solving this with React’s Suspense, which prevents the UI from loading until the images come in. This solves the content reflow problem but at the expense of performance. The user

Read More

An Interactive Starry Backdrop for Content | CSS-Tricks

I was fortunate last year to get approached by Shawn Wang (swyx) about doing some work for Temporal. The idea was to cast my creative eye over what was on the site and come up with some ideas that would give the site a little “something” extra. This was quite a neat challenge as I consider myself more of a developer than a designer. But I love learning and leveling

Read More

Improving Icons for UI Elements with Typographic Alignment and Scale | CSS-Tricks

Utilizing icons in user interface elements is helpful. In addition to element labeling, icons can help reinforce a user element’s intention to users. But I have to say, I notice a bit of icon misalignment while browsing the web. Even if the icon’s alignment is correct, icons often do not respond well when typographic styles for the element change. I took note of a couple real-world examples and I’d like

Read More

Creating Style Variations in WordPress Block Themes | CSS-Tricks

Global styles, a feature of the block themes, is one of my favorite parts of creating block themes. The concept of global style variations in WordPress were introduced in Gutenberg 12.5 which would allow theme authors to create alternate variations of a block theme with different combinations of colors, fonts, typography, spacing, etc. Different theme.json files stored under /styles folder “lets users quickly and easily switch between different looks in

Read More