5 ms·
Tangentially, for those doing web development, CSS has a bunch of "logical" properties [1] that adapt to the locale of the user agent. For example, you can swap
by disintegrator 4y ago
Tangentially, for those doing web development, CSS has a bunch of "logical" properties [1] that adapt to the locale of the user agent. For example, you can swap out `margin-left` and `margin-bottom` in your CSS with `margin-inline-start` and `margin-block-end` respectively. Similarly, `text-align` accepts start/end instead of left/right. Even if you're not targetting right-to-left or top-to-bottom locales, it's easy enough to switch to logical properties and get most of the work out of the way if you change your mind in the future.
[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical...
- lelandfe 4y agoDo "top-to-bottom locales" exist? Has anyone built a site with users that get utility out of these? I've usually found that 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. I suspect their popularity is owed to tutorial authors showing off their CSS prowess. (I'm also not convinced of the need to flip sizing values for RTL/LTR, but that's at least useful)
- H8crilA 4y agoJapanese is actually top to bottom, but they largely gave up on that idea. Probably too much hassle.
- irrational 4y agoBut, there are still texts that are read top to bottom. I only know that because my daughter has a Japanese friend and she has shown me some of her books and how they are read top to bottom.
- tmtvl 4y agoSame with Mongolian, but JP goes TBRL (Top to Bottom, Right to Left), Mongolian goes TBLR. Wikipedia has an overview: https://en.wikipedia.org/wiki/Writing_system#Directionality https://en.wikipedia.org/wiki/Writing_system#Directionality
- disintegrator 4y agoI'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.
- jeroenhd 4y agoHere's a guide to styling such text: https://www.w3.org/International/articles/vertical-text/ https://www.w3.org/International/articles/vertical-text/ Chinese/Korean/Japanese/Vietnamese originally, but computers have made horizontal writing more common on the internet. Modern Vietnamese is also written in a variation of the Latin script, of course. Mongolian still uses the vertical Mongolian script, though Cyrillic script m has also been introduced in Mongolia during Soviet times and seems to be common inside Mongolia. However, the Mongolian government seems to be moving back to using the original Mongolian script. Furthermore, the Mongolian people inside China never took up the Cyrillic writing system. Websites can and do use the vertical script: https://president.mn/mng/ https://president.mn/mng/ http://khumuunbichig.montsame.mn/index.php?home&readnews=572 http://khumuunbichig.montsame.mn/index.php?home&readnews=572 Google uses the Mongolian Cyrillic alphabet (https://www.google.com/?hl=mn https://www.google.com/?hl=mn) so even companies that seem to have a page in every single language don't seem to bother with supporting the original script. This is probably because the Mongolian speakers inside China can't make much use of Google anyway. Funnily enough, Mongolian is one of the few known scripts not only written vertically but also left to right, unlike other Asian vertical scripts (which go right to left).
- pradn 4y agoYes! The website of the president of Mongolia has three versions, including one with the traditional top-to-bottom script. It's quite well-designed! You can see web-design features that make sense for this script: the nav-bar being on the left, left-to-right scrolling, and pagination at the right end. https://president.mn/mng/ https://president.mn/mng/
- mc32 4y agoThey should make people turn their monitors vertically oriented --are monitors in MN usually in "portrait" or do they maintain a discrepancy of vertical text but horizontal layout?
- pradn 4y agoI think it's ok to have horizontal monitors even for "top-to-bottom" scripts. That's simply because it's less taxing for us to use. Plus, mouse scrollwheels work just as well so it's not problem to navigate.
- lelandfe 4y agoThat site is well made. This is a bit pedantic, but if the default for that site is horizontal text, I'm not sure I would call this a "top-to-bottom locale": https://president.mn/ https://president.mn/
- shantara 4y agoI’m somewhat surprised to see that some of the characters are not being correctly displayed in iOS Safari. I was expecting the symbols common enough to be used on an official page of a head of state to be common enough for inclusion in the Unicode standard. Or is it a font issue?
- kccqzy 4y agoGo to any random bookstore in Taiwan and pick up a book in traditional Chinese. It's top-to-bottom, and right-to-left. The spine of the book is flipped compared with western books: it's on the right side when the cover is facing up.