Search
HTML Video Sources Should Be Responsive
11.2.2021
Scott Jehl doesn’t mince words here:
Removing media support from HTML video was a mistake. It means that for every video we embed in HTML, we’re stuck with the choice of serving source files that are potentially too large or
…
The post HTML Video Sources Should...
Proper Tabbing to Interactive Elements in Firefox on macOS
15.1.2021
I just had to debug an issue with focusable elements in Firefox. Someone reported to me that when tabbing to a certain element within a CodePen embed, it shot the scroll position to the top of the page (WTF?!). So, …
The post Proper Tabbing to Interactive Elements in Firefox on macOS...
Exploring What the Details and Summary Elements Can Do
26.11.2020
We’ve mentioned before just how great the <details> and <summary> elements are. They’re great for quickly making accordions that are accessible to touch, mouse, and keyboard input:
CodePen Embed Fallback
<details> and <summary> can even be used to play/pause gifs!...
BIS Paper Says There’s Potential to Embed Regulation Into Stablecoin Systems
25.11.2020
The need to regulate global stablecoins like Libra doesn't mean authorities can't embrace innovation, according to according to a BIS working paper
grid-auto-flow : CSS Grid :: flex-direction : Flexbox
19.11.2020
When setting a parent element to display: flex, its child elements align left-to-right like this:
CodePen Embed Fallback
Now, one of the neat things we can do with flexbox is change the direction so that child elements are stacked vertically on top of each other in a column. We can do that with...
Firefox 83
19.11.2020
There’s a small line in the changelog that is is big news for CSS:
We’ve added support for CSS Conic Gradients (bug 1632351) and (bug 1175958).
🎉🎉🎉
Conic gradients are circular, just like their radial counterpart, but place color stops...
CSS Background Patterns
17.11.2020
Nice little tool from Jim Raptis: CSS Background Patterns. A bunch of easy-to-customize and copy-and-paste backgrounds that use hard stop CSS gradients to make classy patterns. Not quite as flexible as SVG backgrounds, but just as lightweight.
Like this:
CodePen Embed Fallback
Speaking of cool...
ARIA in CSS
11.11.2020
Jeremey reacting to Sara’s tweet, about using [aria-*] selectors instead of classes when the styling you are applying is directly related to the ARIA state.
… this is my preferred way of hooking up CSS and JavaScript interactions. Here’s [an] old CodePen where you can see...
How to Animate the Details Element Using WAAPI
5.11.2020
Animating accordions in JavaScript has been one of the most asked animations on websites. Fun fact: jQuery’s slideDown() function was already available in the first version in 2011.
In this article, we will see how you can animate the native <details> element using the Web Animations...
How to Write Loops with Preprocessors
5.11.2020
Loops are one of those features that you don’t need every day. But when you do, it’s awfully nice that preprocessors can do it because native HTML and CSS cannot.
Sass (SCSS)
for Loop
CodePen Embed Fallback
while Loop
CodePen Embed Fallback
each Loop
CodePen Embed Fallback
Less
for...
Gray Burst
3.11.2020
I made this neat little gray burst thing. It’s nothing particularly special, especially compared to the amazing creativity on CodePen, but I figured I could document some of the things happening in it for learning reasons.
CodePen Embed Fallback
It’s SVG
SVG has <line x1 y1...
Creating CSS Shapes with Emoji
24.10.2020
CSS Shapes is a standard that lets us create geometric shapes over floated elements that cause the inline contents — usually text — around those elements to wrap along the specified shapes.
Such a shaped flow of text looks good in editorial designs or designs that work with text-heavy contents...
Styling Complex Labels
5.10.2020
Danielle Romo covers the HTML pattern you need when you have a wordy <label> with fancy styling for an <input type="radio">.
The trick? The ol’ <span class="hidden-visually"> that contains the label that you want to be read, and a <span aria-hidden="true"> with...
Using max() for an inner-element max-width
7.9.2020
I go into all this in The “Inside” Problem. The gist: you want an edge-to-edge container, but the content inside to have a limited width. I think there is absolutely no problem using a nested element inside, but it’s also fun to look at the possibilities of making that work on...
A CSS-only, animated, wrapping underline
21.8.2020
Nicky Meuleman, inspired by Cassie Evans, details how they built the anchor link hover on their sites. When a link is hovered, another color underline kinda slides in with a gap between the two. Typical text-decoration doesn’t help here, so multiple backgrounds are used instead,...
Can you get valid CSS property values from the browser?
19.8.2020
I had someone write in with this very legit question. Lea just blogged about how you can get valid CSS properties themselves from the browser. That’s like this.
CodePen Embed Fallback
That gives you, for example, the fact that cursor is a thing. But then how do you know what valid values...
More Control Over CSS Borders With background-image
7.8.2020
You can make a typical CSS border dashed or dotted. For example:
.box {
border: 1px dashed black;
border: 3px dotted red;
}
You don’t have all that much control over how big or long the dashes or gaps are. And you certainly can’t give the dashes slants, fading, or animation!...
Lumi Wallet Web Widget: Cryptocurrency Exchange on Your Website
7.8.2020
Good news for those who want to upgrade their website with functional tools and features – on August 5st, Lumi Wallet Technologies launched its app web widget. Now everyone can easily embed a “mini digital wallet” into the body of their website. The Lumi Wallet Widget is a useful...
Getting the Most Out of Variable Fonts on Google Fonts
30.7.2020
I have spent the past several years working (alongside a bunch of super talented people) on a font family called Recursive Sans & Mono, and it just launched officially on Google Fonts!
Wanna try it out super fast? Here’s the embed code to use the full Recursive variable font family from Google...
Lazy Loaded Prefill Embeds
13.7.2020
Lemme sum this up:
CodePen has Embedded Pens. Build a Pen on CodePen, embed it on any other site.
We also offer Prefill Embeds, which remove that first step. With Prefill Embeds, the Pen doesn’t need to exist on CodePen at all. You pass in the code and settings you want to appear in...