Search
Pseudo-Randomly Adding Illustrations with CSS
17.4.2020
Between each post of Eric Meyer’s blog there’s this rather lovely illustration that can randomly be one of these five options:
Eric made each illustration into a separate background image then switches out that image with the nth-of-type CSS property, like this:
.entry:nth-of-type(2n+1)::before...
How to Repeat Text as a Background Image in CSS Using element()
26.3.2020
There’s a design trend I’ve seen popping up all over the place. Maybe you’ve seen it too. It’s this sort of thing where text is repeated over and over. A good example is the price comparison website, GoCompare, who used it in a major multi-channel advertising campaign.
Nike has used it as well...
Flexible Repeating SVG Masks
22.3.2020
Tyler Gaw reminds us that mask-image can repeat, resize, and move just like background-image does, which is fun to combine and play with. I could see it being a fun option for an <hr, like Sara is doing.
CodePen Embed Fallback
Direct Link to Article — Permalink… Read article...
A Few Background Patterns Sites
18.3.2020
If I need a quick background pattern to spruce something up, I often think of the CSS3 Patterns Gallery. Some of those are pretty intense but remember they are easily editable because they are just CSS. That means you could take these bold zags and chill them out.
CodePen Embed Fallback
My usual...
Sass !default and themeable design systems
11.3.2020
This is a great blog post from Brad Frost where he walks us through an interesting example. Let’s say we’re making a theme and we have some Sass like this:
.c-text-input {
background-color: $form-background-color;
padding: 10px
}
If the $form-background-color variable isn’t defined then...
Background Scale Hover Effect with CSS Clip-path
11.3.2020
A simple recreation of the background scale hover effect seen on the DDD Hotel website using CSS clip-path.
Background Scale Hover Effect with CSS Clip-path was written by Mary Lou and published on Codrops
Adventures in CSS Semi-Transparency Land
9.3.2020
Recently, I was asked to make some tweaks to a landing page and, among the things I found in the code, there were two semitransparent overlays — both with the same RGB values for the background-color — on top of an image. Something like this:
<img src='myImage.jpg'/>
<div...
4 Ways to Animate the Color of a Text Link on Hover
3.3.2020
Let’s create a pure CSS effect that changes the color of a text link on hover… but slide that new color in instead of simply swapping colors.
There are four different techniques we can use to do this. Let’s look at those while being mindful of important things, like accessibility, performance,...
Chameleonic Header
26.2.2020
Nice demo from Sebastiano Guerriero. When a fixed-position header moves from overlapping differently-colored backgrounds, the colors flop out to be appropriate for that background. Sebastiano's technique is very clever, involving multiple copies of the header within each section (where the copies...
Add Background Colors to SVGs Using the “rect” Element
20.2.2020
The advantages of using SVGs in web development are well known. SVGs are small in size, can be made quite accessible, are scalable while maintaining their quality, and can be animated. Still, there is a learning curve. Things, like the syntax of SVG, can be a little tricky and having to hand-alter...
Resizing Values in Steps in CSS
30.1.2020
There actually is a steps() function in CSS, but it's only used for animation. You can't, for example, tell an element it's allowed to grow in height but only in steps of 10px. Maybe someday? I dunno. There would have to be some pretty clear use cases that something like background-repeat: space...
7 Uses for CSS Custom Properties
27.12.2019
I find all seven of these quite clever and useful.
I particularly like using custom properties when you can sneak a variation into a place where you'd normally have to re-declare a whole big chunk of code.
.some-element {
background-color: hsla(
var(--h, 120),
var(--s, 50),
var(--l...
Weekly Platform News: Strict Tracking Protection, Dark Web Pages, Periodic Background Sync
12.12.2019
In this week's news: Firefox gets strict, Opera goes to the dark side, and Chrome plans to let web apps run in the background.
Let's get into the news.
Firefox for Android will block tracking content
Mozilla has announced that the upcoming revamped Firefox for Android (currently available in...
Freak Flags
11.12.2019
I don't see image sprites used that much anymore, but it's still a good technique for reducing downloaded decorative image assets when you have multiple on a page. The big idea is combining all the graphics into one and then shifting around the size and background-position to reveal one at...
A Handy Sass-Powered Tool for Making Balanced Color Palettes
9.12.2019
For those who may not come from a design background, selecting a color palette is often based on personal preferences. Choosing colors might be done with an online color tool, sampling from an image, "borrowing" from favorite brands, or just sort of randomly picking from a color wheel until...
Everything and Nothing
22.11.2019
I've been thinking about the question for a solid month now. What about building websites has you interested this year? The question pervaded my solitary thoughts and played in the background during my conversations. I’d love to just tell you the answer I’ve come to, but the more interesting part...
Weekly Platform News: Contrast Ratio Range, replaceAll Method, Native File System API
22.11.2019
In this week's roundup: Firefox's new contrast checker, a simpler way to lasso substrings in a string, and a new experimental API that will let apps fiddle with a user's local files.
Firefox shows the contrast ratio range for text on a multicolored background
According to Success Criterion 1.4.3...
The Amazingly Useful Tools from Yoksel
15.11.2019
I find myself web searching for some tool by Yoksel at least every month. I figured I'd list out some of my favorites here in case you aren't aware of them.
Need to duo-tone an image? SVG filters can do that. Lentie Ward wrote about it for us, and Yoksel has a tool to create the filters...
A Look at JAMstack’s Speed, By the Numbers
1.11.2019
People say JAMstack sites are fast — let’s find out why by looking at real performance metrics! We’ll cover common metrics, like Time to First Byte (TTFB) among others, then compare data across a wide section of sites to see how different ways to slice those sites up compare.
First, I’d like...
Shots Fired as Nancy Pelosi Challenger Bacelar Funds Campaign With Crypto
2.10.2019
27-year-old Agatha Bacelar is a Brazilian-American immigrant from a STEM background, and she’s targeting Speaker of the House Nancy Pelosi’s seat in the California Congress (CA-12) in the next election cycle. Her campaign is seeking to raise $1 million in crypto (BTC, BCH, ETH, LTC...