W3C home > Mailing lists > Public > www-style@w3.org > October 2010

RE: [css3-writing-modes] a third option for implementing logical properties

From: Koji Ishii <kojiishi@gluesoft.co.jp>
Date: Mon, 25 Oct 2010 01:03:23 -0400
To: Andrew Fedoniouk <news@terrainformatica.com>, David Hyatt <hyatt@apple.com>, John Daggett <jdaggett@mozilla.com>
CC: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <A592E245B36A8949BDB0A302B375FB4E0AA3634141@MAILR001.mail.lan>
> I cannot see how declarations like this:
> fieldset {
>   display: block;
>   -webkit-margin-start: 2px;
>   -webkit-margin-end: 2px;
>   -webkit-padding-before: 0.35em;
>   -webkit-padding-start: 0.75em;
>   -webkit-padding-end: 0.75em;
>   -webkit-padding-after: 0.625em;
>   border: 2px groove ThreeDFace
> }
> will help to define that fieldset for ttb-ltr writing systems. Even more
> this declaration is I suspect just wrong for TTB writings.

It does help, and is not wrong for TTB writings. You could also use shorthand properties with "logical" keyword to make it shorter.

Imagine you have two sets of this block per direction, or 4 sets including RTL. A year after you wrote this, let's say you wanted to change padding-start. With your example, I can change that easily. With 4 sets duplicated, I have to think "padding-start is left in horizontal so change this line. And is top in vertical, so change padding-top here. If RTL, it's right, so change padding-right here, and if vertical+RTL, it's ah...bottom". You might imagine how annoying it is.

In general, swapping these values make much more sense than sticking physical when you switch between horizontal and vertical. It may not be perfect nor professionally-designed result as Dave said, but serves more than 90% of cases. Simple cases like your example should work perfectly without any issues.

I understand it's annoying if all what you care is horizontal-lr, as you might think "I want to change left margin" rather than "I want to change start margin". Logical directions force you to translate "left" to "start". If that's the case, you can stick to physical. But people who used to switch directions has already being used to think "I want to change space between this and that", and logical directions can reflect what s/he thinks without translations.

Received on Monday, 25 October 2010 05:01:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:40 UTC