top | item 40007080

(no title)

quaunaut | 1 year ago

I'd ask what you mean by "fighting the browser"- as generally, the number one way to ruin the performance of your CSS is to introduce depth to it. In general, keeping everything isolated regularly leads to better rendering performance.

discuss

order

no_wizard|1 year ago

Avoiding the cascade at all costs, for example. It can introduce a lot of unintended consequences.

Another anti pattern I have seen is the over use of media queries to force the browser to do certain things rather than embracing relative sizing constraints via intrinsic design and letting the flexbox and grid algorithms do most of the heavy lifting.

Here though I want to point out isolation is relative, as is the cascade. I think it’s important to leverage the cascade wherever you can but that doesn’t mean you are leveraging it from top to bottom per say, but it does mean thinking more wholistic about the context of styling

ThunderSizzle|1 year ago

To be fair, there was a time that flexion did not exist and extensive use of media queries was the only way to create a responsive website.

Those efforts don't just dissappear quickly, since that was the only way available that worked across all browsers for nearly a decade.