[csswg-drafts] [css-logical] Syntax for `margin`-like shorthands

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-logical] Syntax for `margin`-like shorthands ==

CSS currently assigns the values in the margin/padding/border shorthand to their physical longhands, i.e.
```
  margin: 1em 2em 3em 4em;
```
is equivalent to
```
  margin-top: 1em;
  margin-right: 2em;
  margin-bottom: 3em;
  margin-left: 4em;
```

I'm pretty sure we want some equivalent syntax for assigning into the logical longhands instead, but what should that be?

The current proposal is to put a keyword in front of the 4 values, like
```
  margin: relative 1em 2em 3em 4em;
```
Another possibility is to use a !keyword:
```
  margin: 1em 2em 3em 4em !relative;
```
or to create a new property in its place:
```
  margin-relative: 1em 2em 3em 4em;
```
or use some entirely as-yet-unused symbol or syntax.

And of course the exact keyword, if one is used, is up for debate as well; shorter would be better. People will be drawing up entire style sheets that use almost exclusively flow-relative properties, so this needs to be designed for comfort under frequent use.

Ideas welcome~

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1282 using your GitHub account

Received on Sunday, 23 April 2017 18:31:29 UTC