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

> 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.


Regards,
Koji

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