I was doing my Advent of UI Components, and I stumbled upon the from-font value for the text-decoration-thickness CSS property. I was curious about it, so I did a little research and I think what I found (and learned) is both interesting and worth sharing.
About the from-font value
Here’s how MDN defines the from-font...
Saturday, January 29, 2022
Friday, January 28, 2022
undefined
202
A while ago, jOOQ has added the org.jetbrains:annotations dependency to the jOOQ API, in order to annotate return types with nullability information. For example, the entire DSL is non-nullable:
public interface SelectWhereStep<R extends Record>
extends SelectConnectByStep<R> {
@NotNull @CheckReturnValue
...
undefined
202
I’m always on the wrong branch. I’m either on master or main working on something that should be on a fix or feature branch. Or I’m on the last branch I was working on and should have cut a new branch. Oh well. It’s never that big of a deal. Basically means switching unstaged changes to a new branch. This is what I normally...
undefined
202
TypeScript is a wonderful tool for writing JavaScript that scales. It’s more or less the de facto standard for the web when it comes to large JavaScript projects. As outstanding as it is, there are some tricky pieces for the unaccustomed. One such area is TypeScript discriminated unions.
Specifically, given this code:
interface...
undefined
202
(This is a sponsored post.)
Design systems are an entire job these days. Agencies are hired to create them. In-house teams are formed to handle them, shipping them so that other teams can use them and helping ensure they do. Design systems aren’t a fad, they are a positive evolution of how digital design is done. Backlight...
Thursday, January 27, 2022
undefined
202
Say you have three HTML classes, and a DOM element should only have one of them at a time:
<div class="state-1"></div>
<div class="state-2"></div>
<div class="state-3"></div>
Now your job is to rotate them. That is, cycle through classes on an HTML element. When some event occurs, if...
Wednesday, January 26, 2022
undefined
202
Have you ever tried to make CSS borders in a repeating zig-zag pattern? Like where a colored section of a website ends and another differently colored section begins — not with a straight line, but angled zig zags, rounded humps, or waves. There are a number of ways you could do this sort of CSS border, dating all the...
undefined
202
Say you’ve got a <Card /> component. It’s highly likely it shouldn’t be butted right up against any other components with no spacing around it. That’s true for… pretty much every component. So, how do you handle component spacing in a design system?
Do you apply spacing using margin directly on the <Card />?...
Tuesday, January 25, 2022
A little bit of animation on a site can add some flair, impress users, and get their attention. You could have them run, no matter where they are on the page, immediately when the page loads. But what if your website is fairly long so it took some time for the user to scroll down to that element? They might miss it.
You...