5 ms·
the fact you can set a CSS version in your code, and have it not act as it did when that version was originally standardized, is exactly what being "defensive"
by distantsounds 4y ago
the fact you can set a CSS version in your code, and have it not act as it did when that version was originally standardized, is exactly what being "defensive" is about. the code you wrote years ago doesn't work anymore because the browsers have decided to do things differently now.
and yet I can run applications from 30 years ago and it will still function as it once did. no hacks or code changes required.
you shouldn't have to "future proof" source code against an outside entity just coming in and breaking it all. especially when it's supposed to be an open standard.
- rimliu 4y agoWindows is full of hacks to allow that "I can run applications from 30 years ago" to happen.
- squidbeak 4y agoI'm curious which css code from years ago won't work any more. Care to elaborate?
- noisymemories 4y agoNot OP, but flexbox went very famously trough a few breaking changes throughout its early history: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Backwards_Compatibility_of_Flexbox https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexibl... There were also some more subtle behavior changes a few years ago in the way webkit handled unprefixed flex-direction centering properties (align-items, justify-content) together with min-width/min-height attributes, switching from behaving closer to IE11 in this regard to basically emulating Blink. AFAIK neither behavior was really against-spec. And if you really want to go all-in with some really deep philosophical questions, I can suggest you the following: Is it possible to center text in a select box? https://stackoverflow.com/questions/10813528/is-it-possible-to-center-text-in-select-box https://stackoverflow.com/questions/10813528/is-it-possible-...