Join Nostr
2024-12-03 05:02:10 UTC

Lea Verou, PhD on Nostr: #webcomponents API design dilemma: consistency with the platform or ergonomics? HTML ...

#webcomponents API design dilemma: consistency with the platform or ergonomics?

HTML uses concatenatedcase for attributes¹ which is *terrible* for readability². But if you choose to do something different in your components they will end up with a mix of both since native attributes still apply, which also sucks.

What to do?

¹ https://w3.org/TR/design-principles/#casing-rules
² Especially as we start having 4 word attributes like shadowrootreferencetarget 🤮