Web Weekly #187
Guten Tag! Guten Tag! ๐
Have you heard of focusgroup? Did you try aliases in Node.js imports already? Or do you know that CSS is available in JavaScript?
Turn on the Web Weekly tune and find some answers below. Enjoy!
::: highlight quote Mario listens to "Ethel Cain - Waco, Texas" and says:
This is my kind of opera. :::
Do you want to share your favorite song with the Web Weekly community? Hit reply; there are four more songs left in the queue.
If you enjoy Web Weekly, share it with your friends and family.
A quick "repost" really helps this indie newsletter out. Thank you! โค๏ธ
Web Weekly housekeeping
A big thank you and a huge bag of karma points go to Jonathan this week. Thank you for supporting indie publishing in the times of AI slop by covering a small fraction of the cost it takes to send Web Weekly every week! My little side project is now supported by 40 people. This makes me incredibly happy (and proud). โค๏ธ
You can support Web Weekly on Patreon or GitHub Sponsors.
And also, I messed up a link last week. I clicked all the links before sending the email, but because last week was an "unofficial Temami edition", I didn't recognize that I linked to the wrong post. Here's the correct link to anchor positioning issues. Sorry!
No code
I didn't discover good "No code" articles this week. Did you read something great beyond coding lately? I'd love to read it, too!
color-contrast() beyond black & white
With Chrome 147 (planned for Mar 25), the contrast-color() function will be newly available across all browsers. Theoretically, the function lets you throw a color in and get an accessible contrast color out. It's a great idea, but contrast-color() is limited to returning black or white right now.
Una describes how to work around this limitation.
<a class="btn btn__small" href="https://una.im/advanced-contrast-color/">Mix all the colors</a>
Form-associated custom elements
Granted, Rob's article is very long, but the intro paragraphs make it worth reading already.
I've seen the attachInternals() method quite a few times in custom elements materials, but I never really understood what it's about.
Now I do, and it's quite cool if you're dealing with web components. Thanks, Rob!
<a class="btn btn__small" href="https://frontendmasters.com/blog/form-associated-custom-elements-in-practice/">Attach your inputs</a>
A new focusgroup RFC
There's a new HTML feature shipping behind a flag in Chromium: focusgroup. The idea is that the attribute will make it easier to build components that require custom focus handling.
It's also wild that a focusgroup is supposed to set the correct ARIA roles automatically. If this works, maybe that will make the web a bit more accessible? I've heard some skeptical voices already, though.
Browsers are asking for feedback, so now is your chance!
<a class="btn btn__small" href="https://developer.chrome.com/blog/focusgroup-rfc">Test it out!</a>
Stop checking for view transition support
You've probably written this snippet many times by now. ๐ Even though view transitions have been cross-browser supported for a while, you still have to check every time if they're available with if (document.startViewTransition). What if you didn't have to do that? Bramus released a non-visual polyfill.
<a class="btn btn__small" href="https://www.bram.us/2026/03/11/view-transitions-mock-is-a-non-visual-polyfill-for-same-document-view-transitions/">Remove some ifs</a>
The wonderful weird web โ JND
Today I learned about JND: Just Noticeable Difference. Keith built a fun little game for your lunch break. To what point can you differentiate the colors?
<a class="btn btn__small" href="https://www.keithcirkel.co.uk/whats-my-jnd/">Look closely</a>
Native JSON modules with import attributes
You can load JSON files via import attributes (that's the fancy with syntax) across modern browsers for roughly a year now. But how do import attributes affect caching? And are they really that much better than what bundlers already provided for years? Matt has some answers.
<a class="btn btn__small" href="https://allthingssmitty.com/2026/03/16/native-json-modules-are-finally-real/">Import your JSON</a>
Even more customizable selects
I know that I plugged a great-looking select last week already, but man... I'm very much into these new ways of customizing select elements. Patrick's article comes with many explanations this week.
<a class="btn btn__small" href="https://css-tricks.com/abusing-customizable-selects/">Select!</a>
Feature detection of at-rules
Disclaimer: at-rule() is far from being cross-browser supported and will only hit Chrome in version 148 (we're currently at 146), but it's still cool that we'll be able to check support for at-rules (e.g. @starting-style) in the future.
<a class="btn btn__small" href="https://www.bram.us/2026/03/15/at-rule/">Detect</a>
Node.js subpath imports
Do you know that you can set custom import paths in vanilla Node.js? If not, John explains how they work. He's kind of skeptical about the idea, but I'm really digging it!
<a class="btn btn__small" href="https://johnnyreilly.com/only-node-subpaths-with-no-restricted-imports-and-perfectionist-sort-imports">Shorten your imports</a>
Random MDN โ CSS .to() in JS
From the unlimited MDN knowledge archive...
Here are two fun ones. First, do you know that CSS exists in JavaScript? And second, how cool is it that you can convert one unit into another?
<a class="btn btn__small" href="https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue/to">Convert</a>
Disclaimer: .to() doesn't work in all browsers yet but will land in Firefox soon!
TIL recap โ svg elements can be nested
Here's a quick learning from eight years ago: did you know that you can nest svg elements? Now you do!
<a class="btn btn__small" href="https://www.stefanjudis.com/today-i-learned/you-can-nest-svg-elements/">Nest all these SVGs</a>
::: highlight info Find more short web development learnings in my "Today I learned" section. :::
New on the baseline โ CSS shape()
With Firefox 148, the CSS shape() function entered the baseline, which means that you can now pair offset-path or clip-path with a function that understands CSS. That's right! No more SVG syntax fiddling!
<a class="btn btn__small" href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/basic-shape/shape">Shape!</a>
Three valuable projects to have a look at
arktypeio/arktype โ A TypeScript validator that's optimized from editor to runtime.
mcollina/snipgrapher โ A CLI to generate image snippets from code files.
jalonsogo/tui-studio โ A visual design tool for building Terminal User Interfaces.
A new Tiny Helper
As a WW subscriber, you should be pretty well aware of what's going on with browser features and the baseline. If the newsletter isn't enough, BaseWatch looks great!
<a class="btn btn__small" href="https://basewatch.dev/">Stay up to date</a>
::: highlight info Find more single-purpose online tools on tiny-helpers.dev. :::
Thought of the week
Here are some wise words from one of my favorite bloggers.
::: highlight quote
Data tells you what people consume, not what you should make. [...] "What is happening?" and "What should happen?" are two completely different questions and should be dealt with as such. :::
Did you learn something from this issue?
โค๏ธ If so, join 40 other Web Weekly supporters and give back with a small monthly donation on Patreon or GitHub Sponsors.
This is all, friends!
Loved this email? Hated this email? I want to hear about it!
If you think something needs improvement or something sparked some joy, reply to this email because I want to know more!
And with that, take care of yourself โ mentally, physically, and emotionally.
I'll see you next week! ๐