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.

Welcome to Web Weekly #21!

Hello friends! I'm a few hours late because I had such a lovely weekend. I saw some friends, listened to music and read an entertaining book. ๐Ÿ˜Š It felt like the first "somewhat normal" weekend for ages here in Berlin. I hope this madness is getting to an end where you live, too!

Before we jump into web stuff, let me share with you what made me smile this week. If you're into dogs (or trampolines), this video is just too cute.

A dog on a trampolin

This week's Web Weekly includes:

  • cutting-edge CSS features
  • the soon-to-be cross-browser supported requestSubmit method
  • the address HTML element

... and, as always, GitHub repositories, a new Tiny Helper and some music.

Ready? Steady. Go!

Things to not do yourself โ€“ email address validation

1. Email addresses can contain multiple '@'s.

When doing web development, you might have learned that there are things that you don't want to implement from scratch. Email address validation is one of these things. Jan Schaumann wrote a nicely nerdy post sharing many details of valid/invalid email addresses. Enjoy!

Learn some email address trivia

How to get the most out of the things you read

One of the benefits of reading is that it allows you to master the best of what other people have already figured out. This is only true, however, if you can remember and apply the lessons and insights from what you read.

I make an active effort to get away from a screen and to read more books right now. To get the most out of my reading, I highlight and reread valuable paragraphs. The article "Reading better" inspired me to write (and maybe publish) book summaries, too.

Let's see how this goes; I'll keep you posted. ๐Ÿ™ˆ

Get more out of your reading

How to combine CSS animations

Source code: element.animate({   transform: ['translateY(0vh)','translateY(90vh)'] }, {   duration: 2000,   easing: 'ease-in',   iterations: Infinity,   direction: 'alternate',   composite: 'add' });

I had this tab open for several months (yeah... I'm that kind of person). Dan Wilson shared that you can use the Web Animation API to combine animations (that's not possible using CSS). It's a handy trick for sure!

Combine your animations

If you want to start blogging but don't know what to write

Instead, when I learn something that helps me, I write about it so that it can help other people too. For example, one specific thing I struggled with in Rust was understanding references, and so I wrote whatโ€™s a reference in Rust? about what I learned.

As you might have noticed, I'm a big fan of writing down what I learned. Writing things down helps me formalizing my thoughts but also makes my progress visible. And the best thing about TIL posts (Today I learned) is that they don't have to be super long or polished. They're for me! Short'n'sweet does the job just fine.

Julia Evans shared her approach to blogging; it's an excellent read with more good advice!

Write about things you learned

And if you're running a TIL blog, please send it my way! I love reading TIL posts.

The dark magic of JavaScript

Source code: www.baidu.com.then(response => {     console.log(response.status);     // ==> 200 })

The above snippet came my way, and it's quite "something", isn't it? You probably shouldn't implement and use it, but I must admit it's somewhat beautiful. It uses Proxy and Reflect, and you can find the code on GitHub.

Inspect the www proxy

Well-meant but harm causing actions

But also understand that I have as much of a right to personal space as anyone else. You donโ€™t know what kind of trauma a person lives with, or whether they have other disabilities, or if theyโ€™re just an introvert who doesnโ€™t enjoy physical contact. If you wouldnโ€™t like to be blindfolded and have people grab you out of nowhere, please donโ€™t do it to me.

Disability rights activist Holly Scott-Gardner shared her experience of living in this world while being blind. The article "Iโ€™m Tired of Begging Strangers to Stop Touching Me Wherever I Go" is an insightful read on personal space and how to offer help in general.

Learn how to offer help

TIL โ€“ document.hasFocus() is a thing

Source code: document.hasFocus(); // true

Lea Verou shared ways to figure out if a browser tab has focus. Surprisingly, Lea ruled out the solution (document.hasFocus()) at first. If you prototype code in the JS console regularly, be aware that some methods might behave differently in this environment. Her article explains why.

Check if tabs are focused

New features coming to CSS

 31 Features, Rapid Fire  from: risky and never in any browser to: stable and available in many browsers!

You'll need a little bit of time to go over all the resources coming now. ๐Ÿ™ˆ Adam Argyle shared a massive overview of upcoming CSS features and exciting things that are coming our way.

Check what's new in CSS

TIL โ€“ an address HTML element exists

HTML code: <p>Contact the author of this page:</p>  <address>   <a href="mailto:jim@rock.com">jim@rock.com</a><br>   <a href="tel:+13115552368">(311) 555-2368</a> </address>

This week I found out about the address HTML element! ๐Ÿ˜ฒ You can use it to provide contact information. Interestingly, according to MDN, there's no implicit ARIA role defined for the address element. I believe that makes it useless for assistive tech (please correct me if I'm wrong!).

I wonder if Google gives this element some special treatment. If you know more about this topic, I'd love to learn more about it!

Learn about the 'address' element

form.requestSubmit is entering Safari Tech Preview

DevSheet explaining HTMLFormElement.requestSubmit()

If you're using RSS, I recommend following the Webkit blog because it includes the Safari release notes. New Safari-supported web features have high chances of cross-browser support because Safari is often "late to the party" these days.

FormElement.requestSubmit is one of these features that's soon available in all major browsers. Read about the much-needed form handling feature on the blog.

Learn about 'requestSubmit'

Reader shout out ๐Ÿ’™

# Originally created by Stefan Judis. See # https://www.stefanjudis.com/snippets/a-custom-dev-command-with-auto-completion/ # # Creates a `dev` command for the shell (zsh) including autocompletion to # provide a UI for selecting a dev project in (aka git repository cloned into) # `$__DEV_ROOT_DIR_PATH`. #

I shared a tutorial for my custom dev terminal command last week. It navigates into the correct working directory, opens VSCode and also runs npm dev. Christoph Wanja took my approach as an opportunity to come up with a way more sophisticated script. It's available on GitHub and it's super well-documented!

Thank you for sharing, Christoph! And thank you all for reading along. ๐Ÿ’™

A new Tiny Helper

SVG Filter UI with a prview window

If you have tried writing SVG filters by hand, you know that this is not easy. The "SVG Filter Builder" is a visual tool to create and combine SVG filters. It looks super cool!

Create SVG filters

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

Three valuable projects to have a look at

  • utterance/utterances โ€“ A lightweight comments widget built on GitHub issues.
  • pluja/awesome-privacy โ€“ A curated list of services and alternatives that respect your privacy because PRIVACY MATTERS.
  • boringdesigners/boring-avatars โ€“ A JavaScript React library that generates custom, SVG-based, round avatars from any username and color palette.

A quote to think about

I couldn't find out who's responsible for the quote of this week, but the following line is very true for coding, writing, speaking, and maybe even life in general. ๐Ÿ™ˆ

Clear is always better than clever.

A song that makes you stop coding

Beatsteaks concert

For the Berlin folks: I just bought (literally two minutes ago) tickets for Berlin's best live band. I've seen the Beatsteaks play live many times and can't wait to stand in front of a stage singing my favorite songs again.

Until then, here's the legendary song "I don't care as long as you sing", which makes my morning right now!

Listen to "I don't care as long as you sing"

Thank you for reading!

And that's a wrap for the twenty-first Web Weekly! If you enjoy my newsletter, I'd love you to tell others about it. โ™ฅ๏ธ

If you're not a subscriber, you can change that! ๐Ÿ˜‰

Stay safe, and I'll talk to you next week! ๐ŸŽ‰ ๐Ÿ‘‹

PS. I heard the cool kids use RSS. You can find multiple feeds on my site.

If you enjoyed this article...

Join 5.4k 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