Re:Right-to-Left Styling 101
by jacobr on Sunday December 12, 2021 @05:44AM
(#29528547)
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...
[ Parent
| on HN ]
Re:Right-to-Left Styling 101
by chrismorgan on Sunday December 12, 2021 @06:40AM
(#29528795)
I 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, though Firefox 41ā65 should also be marked partial <https://github.com/Fyrd/caniuse/pull/6105>.
Lack 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.