Baldur Bjarnason is a user on toot.cafe. You can follow them or interact with them if you have an account anywhere in the fediverse.
Baldur Bjarnason @baldur

Interesting Twitter thread on how a relatively common 'modern' web dev practice can lead to _dramaticallly_ worse performance twitter.com/notwaldorf/status/

Even more interesting is the resistance against changing said practice once it's demonstrated that it is objectively worse on multiple levels.

· Web · 1 · 1

@baldur Even discounting performance, inline anything is a security/separation of concerns mess.

@szbalint Very true. I've long since given up on trying to use the security argument with other web devs. They are generally so disinterested in security that my words don't even register in their minds.

And 'separation of concerns' is an entirely foreign concept to large parts of the JS scene these days. The front-end component handles everything and every layer these days 😑

@baldur I have a buddy who was very pro massively-inline-CSS after the React folk started pushing it.

Every time I'd question him on things like :hover and transitions he'd hand-wave and say do it in JS.

Every time I'd just 🤦.

It's sheer madness wide-scale inline CSS has taken off (it does have its place mind you, dynamic background-image comes to mind).

@mralex Yeah. Every tool has its place. Inline CSS APIs can be really useful for those bits that are too dynamic for regular CSS to handle. But, like you say, those are edge cases, not the norm.

@baldur inline css in 5 rows are just terrible. Generating css from jsx is a great sin. In my project some parta are written in this style. DOM is absolutely unreadable there

@DmytroGladkyi Yeah. The DOM is generally hard enough to read without adding this layer of convolution to it.

@baldur we can tell react kids about !important. they might use it to 'scope' css

@baldur i've been trying to pinpoint for a while now when i think webdev went completely insane.

all i really know is that it was somewhere well before conversations like this one became possible.

@brennen Yeah, same here. Pretty sure the worst of it happened after the iPhone was introduced, but even then you could make the case that the seeds were laid much earlier.

@baldur yeah - i think various strands with their roots well back in the 90s have converged and amplified one another to the point of our current howling madness.