3 ms·
I'd say it's YAGNI if it required going out of your way to add something on top of your project. CSS logical properties mirror traditional properties one-for-on
by disintegrator 4y ago
I'd say it's YAGNI if it required going out of your way to add something on top of your project. CSS logical properties mirror traditional properties one-for-one. Once you know about them why would you go back to older layout properties? The need to support different locales is really a question of what product you're building or audiences your targeting. e-commerce, news sites, social networks... they seem like good use cases for making the switch and future proofing a little.
- lelandfe 4y agoI love supporting different locales, and have shipped sites for multiple continents. I don't know if your locale in question exists. Forget my question on your users getting utility out of this. Have you ever seen a site, any site, that supports switching to top-to-bottom writing? Against what future are we proofing – a new language arising?
- jfk13 4y agoThe site of the Office of the President of Mongolia is available in top-to-bottom traditional Mongolian script: https://president.mn/mng/ https://president.mn/mng/ Other examples (e.g. vertical Japanese) aren't too hard to find: https://nishinokensetsukogyo.co.jp https://nishinokensetsukogyo.co.jp https://ok-maru.jp https://ok-maru.jp etc.
- lelandfe 4y agoWe're looking for vertical to horizontal switching. Not just examples of vertical writing. Almost all extant vertically-written languages are more commonly seen horizontally on the web. Vertical Japanese on the web (from my American understanding) is a design choice, and is notably absent from mainstays like https://www.yahoo.co.jp/ https://www.yahoo.co.jp/ That is to say, it is unlikely that a site's language switcher would opt for top-to-bottom writing. Edit: the Mongolian president's site does have an English version! ...but it's a completely different site :( https://president.mn/en/ https://president.mn/en/. Still, this is the closest to a use case for logical properties I've seen, so kudos.
- jfk13 4y agoIt's unlikely (I'd guess) that a site would want to offer the exact same page in both horizontal and vertical modes, yes. But it's plausible they might want to share a lot of design elements between horizontal and vertical versions of the content. Using logical properties would make it easier to have a common base of CSS that controls spacing, sizes, etc., that can be used by both language versions, rather than maintaining them completely separately.
- lelandfe 4y agoFor finality, I will quote my original comment: > the arguments for these properties revolve around, "well, what if I decide to use traditional Mongolian in the future?," which seems like the biggest case of YAGNI I can think of ...And even this one close example doesn't use them!