For me, it's sometimes helpful to translate CSS to JavaScript to understand when styles are applied.

For example:

:focus:not(:focus-visible) {
outline: none;

if (element.hasFocus && !element.hasFocusVisible) { = 'none';

Want to add an event listener for a button?

You most probably want to use event.currentTarget instead of

Say you have a <svg> inside the button, if you click on the svg, target will refer to the svg, while currentTarget to the button.

Should every restaurant website look* the same?

* same structure. If you've visited one before and looked for the menu, you would know how to find it on every other one.

They should still look individual (not same bootstrap design), but same structure (like supermarkets).

The less JavaScript you rely on, the less performance & accessibility issues.

Add missing alternative descriptions for some image vs. fixing all a11y issues with your JavaScript-based select.

Add loading="lazy" (except for CLS image) vs. reducing bundle size by 50%.

TIL one can style #rss feeds 🤯

You can even provide an info message for people who don't know what RSS is 💡

Here's mine:

It's based on this script:

Social network for RSS

1) RSS readers offers public URL for an OPML file of a users feeds
2) RSS reader / other services offer a way to follow these OPML files

Always ensure your form can handle different name formats.


Breaking news: there are lots of people named "Lu", "Li", "Ng" etc who might actually buy your products if your web sites allow them to.

10s of millions of Indonesian and Indian people do not have a "last name".

Not everyone is called Karen Eliot or Chad Pancreas.


When I joined twitter 13 years ago, we still had to use things like the IE PNG fix to be able to use transparent PNG in IE6, we were using various CSS hacks for cross-browser support, and Chrome was just released recently. Time flies.

Show older

The original server operated by the Mastodon gGmbH non-profit