Code Snippets
Source code sandbox
Index
Demo or it didn’t happen. Creating self-explanatory examples is by far the best way to convey ideas. While the blog posts listed below provide the background information for each code example, the actual code is hosted on CodePen.
Latest posts
-
Underlines Apart
On using text-underline-offset to separate underlines in nested elements.
Code
-
Feature Detection Strategies
What to do when a CSS feature is not supported cross-browser.
Code
-
:focus-visible and JavaScript
How moving focus with script affects the CSS focus-visible selector.
Code
-
Safari vs. Unstyled Lists
Safari requires ARIA to retain semantics of unstyled lists.
Code
-
Animating Emojis
Lots of clock faces. Lots of possibilities. Let the time fly.
Code
-
Pure CSS Image Comparison Slider, Logical Properties Edition
I’ve already misused the CSS resize property, why am I doing it again?
Code
-
Pure CSS Image Comparison Slider
Can the CSS resize property be tricked into achieving something like this?
Code
-
Maintaining Aspect Ratio, Revisited
Please retire all CSS hacks, aspect-ratio has excellent browser support.
Code
-
accent-color is no CSS variable
But you can try the other way around to make use of your accent color.
Code
-
CSS at-rule nesting Test Page
What started with the question whether @supports may live @media, ended up in a test page.
Code
-
Dark Mode Color Palette
I’ve added Dark Mode to my website. No image editor was harmed in the process.
Code
-
Animating Emojis
Right on time for the festive season, a tree adventure.
Code
The list above contains only the twelve most recent entries. In this section alone, there are 29 blog posts, and there are other sections on this site. To see what else is going on, you may want to head over to the home page or browse using the navigation below.