5 ms·
Most sites should be able to switch to CSS Logical Properties to remove the need to flip directional properties https://developer.mozilla.org/en-US/docs/Web/CSS
by jacobr 5y ago
Most sites should be able to switch to CSS Logical Properties to remove the need to flip directional properties https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical...
- chrismorgan 5y agoI would caution shipping that way for most sites for another year or two, though writing that way is good with the PostCSS plugin. Universal support is very new, with the last parts only landing in Safari and Chromium a few months ago, and even most of the features are only dependable back to mid-2019. See https://caniuse.com/css-logical-props https://caniuse.com/css-logical-props, though Firefox 41–65 should also be marked partial <https://github.com/Fyrd/caniuse/pull/6105 https://github.com/Fyrd/caniuse/pull/6105>.
- jacobr 5y agoLack of browser support is mostly about using -start/-end suffixes, postcss would indeed be useful for this but the majority of the complexity is around requiring 2 different CSS files (ltr and rtl). I’d say with some simple aliasing with postcss you can drop that.