Published at
Updated at
Reading time
8min
The Web Weekly newsletter keeps you up to date, teaches you web development tricks and covers all things working in tech.

Guten Tag! Guten Tag! 👋

Do you know what core web vitals metrics work across browsers? Have you used the closed-by attribute? And is AI really saving time?

Turn on the Web Weekly tune and find some answers below. Enjoy!

Kate listens to "Dick Around" by Sparks and says:

"I'm not saying this is my work anthem, but every day, every day, every night, every night..."

Do you want to share your favorite song with the Web Weekly community? Hit reply; there are five more songs left in the queue.

Last week, I opened Web Weekly with CSS functions (@function) and how they can be used to create a custom --light-dark() function. I learned some things from the reactions.

The existing light-dark() function only works with color values. Why's that?

Bramus blogged about it back in 2023 and the answer is to ship something. The main idea that led to light-dark() was to have a flexible schemed-value() function.

Screenshot 2025-10-20 at 13.59.23:root {   color-scheme: dark light custom; }  body {   color: schemed-value(     light hotpink,                dark lime,                    --custom rebeccapurple      ); }

Specifications are complicated and folks preferred to ship light-dark() over figuring out how to have a highly dynamic function which might have taken "a while". If you want to follow further conversations, here's a spec issue discussing how light-dark() could work for images.

But are there other ways to change non-color styles based on the current color scheme? Ana advocated for a boolean toggle trick.

.my-elem {   border: solid;   border-width: calc(var(--dark)*var(--b1) + var(--light)*var(--b0));   background: url(light.svg), url(dark.svg);   background-size: calc(var(--light)*100%), calc(var(--dark)*100%) }

To be honest, I'm not the biggest fan of these because they're unreadable in my opinion, but hey... use what works for you.

Something that made me smile this week

Previews of multiple 3d web portfolios

I admire people that take the time and effort to create truly unique online portfolios. This post highlights 6 personal websites of which I really don't want to know how long it took to create them.

Stand out

No code

Are editor themes too "loud"?

Limit the number of different color to what you can remember.

I've been happily using the seti theme for years because it's colorful and bright. Niki argues that most themes out there highlight too much. And what should I say, I think he's right and I'll give another theme a try!

Calm your editor

closed-by=any

<dialog closedBy="any">   <p>Hi, I'm a dialog.</p> </dialog>

Adam argues that there aren't enough people talking about the closed-by attribute. And he's right!

closed-by is the declarative way to tell open dialogs when they should close. The property doesn't work in Safari yet, but you can bring in a short JS snippet.

Declare

When the virtual keyboard messes with your viewport

<meta name="viewport"    content="width=device-width,             initial-scale=1.0,             interactive-widget=resizes-content">

Maybe you know the problem, you're on your phone, want to edit some data, the virtual keyboard opens and whoops, important fixed-positioned elements are gone. Where did they go?

Bramus explained how the different viewports (yes, multiple!) are affected by the keyboard and how the fairly new interactive-widget meta element value can help.

Embrace the view(port)

header and footer elements change their roles

Footer elements on the root level get `contentinfo` assigned whereas `footer` elements in a `main` element get `sectionfooter`, "No matching ARIA role" or `generic`.

You're probably using header and footer elements to improve HTML semantics and accessibility, but do you know that the elements don't always get their initial ARIA roles assigned?

Give some structure

You're halfway through!

Wowza! Would you enjoy getting Web Weekly straight to your inbox?

The wonderful weird web – spurious correlations

Correlation between "Solar power generated in Belize" and "The number of fire inspectors in Florida"

I've got nothing but love for the person maintaining this site highlighting correlations that don't look "quite right".

Check the numbers

field-sizing works for input and select elements, too!

Input, select and textarea elements expanding depending on the content.

Here's a quick one: have you heard about the field-sizing property? The new prop allows form controls to grow depending on their content. I thought this will only be about textareas, but it works for input and select elements, too!

Grow!

25 CSS you should know

Adam on stage next to his slides showing @property

Here's Adam giving a whirlwind tour about the latest and greatest CSS features. It'll be well worth your time!

Watch the talk Check the slides

Is AI really saving time?

But whenever someone uses an LLM to generate text, images or code in seconds, their time saving (if real at all) could cost someone else hours.

Theoretically, this post belongs in the "No code" section but Hidde phrased all my thoughts way better than I could, so that I want to highlight it. If you question AI time savings, you should read it!

Evaluate

More perf metrics in more browsers!

Core Web Vitals and their support info. LCP (Chromium, Firefox, Safari TP), INP (Chromium, Firefox, Safari TP) and CLS (Chromium)

When Google started pushing the Core Web Vitals metrics, they were pretty much a Chromium-only thing. Which was a bummer, because then we couldn't measure the experience of people using other browsers.

The competition is slowly catching up though! Let me share some web vitals news:

If you now want to gather all these metrics across browsers, use Google's web-vitals library which should work for all browsers. Happy measuring!

Yet another CSS reset

:where(div, article, header, footer) {   /* ...and other block elements */   display: flex;   flex-direction: column; } 2025-10-20 at 14.22.11

Paweł joined the club of people blogging about their CSS reset preferences (I'm still flying without... 🫣). The post includes some good opinions and lots of links to go deeper!

Reset

Random MDN – Object.freeze()

// Freeze. const o = Object.freeze(obj);  // The object has become frozen. Object.isFrozen(obj); // === true

From the unlimited MDN knowledge archive...

Did you know that you can freeze JavaScript objects? Now you do. 🫵

Freeze!

New on the baseline

details::details-content {   opacity: 0;   transition:     opacity 600ms,     content-visibility 600ms allow-discrete; }  details[open]::details-content {   opacity: 1; }

Did you already celebrate that ::details-content went into the baseline with Firefox 143? If not, now's the time!

Spice up all these details

Three valuable projects to have a look at

A new Tiny Helper

Create Beautiful Charts and Graphs Online  Transform your data into stunning visualizations with our free, powerful chart maker. No downloads, no sign-ups—just beautiful charts in seconds.

I must admit, this one is really cool! You can enter "Make Graph" put some data in and get some graphs out. I can totally see myself using this to create visualizations without code or Excel!

Graph it!

Find more single-purpose online tools on tiny-helpers.dev.

Thought of the week

You've probably noticed that I'm an RSS fan boy, so it's no surprise that Molly's post "Curate your own newspaper with RSS" was right down my alley.

Using RSS is a way to regain control over the information you read online.

Do you enjoy Web Weekly? | Did you learn something from this issue?

❤️ If so, join 25 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! 👋

If you enjoyed this article...

Join 6.2k readers and learn something new every week with Web Weekly.

Web Weekly — Your friendly Web Dev newsletter
Reply to this post and share your thoughts via good old email.
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles