395 private links
If the maximum font size is less than or equal to 2.5 times the minimum font size, then the text will always pass WCAG SC 1.4.4, at least on all modern browsers.
The author also cites https://utopia.fyi/type/calculator/
How to load font the most efficient way in 2025 for nearly every cases.
To keep the code maintainable, keep the css specificity as low as possible.
BEM falls short: class names can get really long; reusability might not be prioritized; and things must be named.
Another case is to use utility classes (atomic css) to avoid css specificity.
A new approach is with cascade layers.
Anyways, Cascade Layers (@layers) groups styles and declares what order the groups should be, regardless of the specificity scores of those rules.
Each has a sweet spot:
- BEM for clear design system that needs to be consistent; team with different philosophies; styles are less likely to leak between components.
- utility classes: build fast, like prototypes or MVPs and component based JS framework
- cascade layers: legacy codebases where you need full specificity control; integrate third party libraries or styles from other sources; working on a large, complex application or projects with long-term maintenance
How they can work together?
The cascade layers can be seen as an orchestrator: one layer for components (BEM); one layer for utilities (utility classes)
While the CSS specificity is low, everything else is kept simple.
Only up the specificity lightly, and note it; the minimum is another class, :where() or the HTML tag.
A single class ".override" can also be used; but "If you’re ever overriding an override, that’s a good place to stop and re-consider. "
Instead of specifying Block or Element specific Modifiers, you create generic semantic classes that apply those repeatable styles to any element that needs them.
When I started creating Kelp, I went down the BEM path. I quickly switched to semantic CSS, and the file size decreased dramatically as a result.
After programming for years, I find creating a class system is better than BEM.
Link protocols
relative link protocol
Text fragments
href="#" scrolls to top
href="" reloads the page
href="." reloads the page and remove hash and search strings
href="?" reloads the page, remove the hash and search strings but preserve the query symbol.
href="data:" handle data URLs
href="video.mp4#t=10,20" for media fragments (support is not there yet)
TL;DR js solutions is often better for accessibility. At least information is conveyed.
Popover will be more useful than ever.
The tradeoff is currently the <details> tag with two limitations: the element does not announce a navigation menu is exposed; clicking outside or pressing Esc does nothing.
Note: JS does not have the concept. If we wanted to mutate something, e’d need to put it in an object first, and then pass that object.
Yes, I missed that thought even if I am programming! We simply pass by value often and reassign the function output to a variable.
I’m still not entirely sure what object freezing is useful for — I feel like it’s rarely what you want.
Me too. I never found a good case for it.
I just want to be able to tell if a function is going to mess with its parameters.
It's a way to tell it. Does the parameters are mutated in-place?
To ensure the parameters
In JS, we can freeze an object. The object can be (deep) cloned in Go. ({...o} as shallow clone in JS)
and I think I start to get it: Rust is awesome as interfaces because it can tell from the function signature if it mutates the parameters.
Indeed:
Similar ideas have been around for a while: In 1990, Philip Wadler wrote Linear types can change the world!
About safety in C or C++:
But those languages should be seen as asbestos.
It comes down to the multiple data structures in Rust.
But this complexity is simply a way to encode the reality of dealing with data in a multi-threaded environment, a way that can be checked at compile-time, before the program even gets a chance to run.
When you manage to make the type system work with you rather than against you, you can build things that would be wildly irresponsible to write in C and C++. And that’s the promise of Rust.
A modal is a small view in the window: this view makes the rest of the content inert.
The author of Kelp use public and private cascade layer.
Public layers are: theme, extend, overrides and effects.
The unit lh can be helpful to adjust the distance of the underline from the text.
Centering text and containery
How to measure web server capacity resource management: here a quick introduction with Rust snippets.
#idea: rewrite it in JS for backend in JS.
I thought of :focus-within and got it right. The author shares a JS snippet and a method with the new :has() selector.
How much do you know out of the basic CSS rules?
The stats are one thing.
The comments are another.
And Piccalili shares it https://piccalil.li/links/the-state-of-css-2025-results-are-in/
How to handle CSS color with the new CSS color functions instead of SASS?
The best seems to be color().
There is also rgba(), hsla() and color-mix()
- color()
It’s evident that there is a growing array of new CSS capabilities that can handle many tasks we previously relied on Sass for.
Yes indeed. Also I agree: it's a per project decision to make.