Jason Knight
1 min readSep 5, 2021

--

The reason for #1 is that :not is often complex, unclear, and lacks legacy browser support. Hell, not even legacy. Browser support in Firefox and Chrome is barely even a year old!

And yes, technically the block behavior is common for absolute and fixed, but what if you're alternating between none and block? What if the element has the new "hidden" attribute?

Whilst yes, MOST of the time you don't need to set it, do not blindly assume there is no reason to do so.

I agree wholeheartedly on transform. It was a sloppy stopgap we no longer need... well, unless one REALLY needs support for IE10/earlier.

And width:100% on a flex container IS often needed, such as when the content is too small and one of your child elements is fluid. Sure if you're going fully Gungan and fixing the width of every element it's iffy, but don't assume a display:flex container grows to width.

Also that PX metric media query is a bit of a middle finger to accessibility. Remember it's called EM, use 'em! PX should NEVER have been used for layouts or queries in the first place!

--

--

Jason Knight
Jason Knight

Written by Jason Knight

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse

Responses (1)