W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

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

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Sun, 23 Apr 2017 18:31:23 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-223656679-1492972282-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC