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

[csswg-drafts] [css-align] Allowing fallback alignments without breaking shorthands

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Thu, 02 Feb 2017 23:22:33 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-205027447-1486077751-sysbot+gh@w3.org>
fantasai has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-align] Allowing fallback alignments without breaking 
shorthands ==
When adding the `place-*` shorthands, we realized that specifying a 
fallback alignment for the content distribution keywords 
(`space-around` etc.) resulted in parsing ambiguities. We debating 
using a slash in the shorthand, but decided not to because it would 
make 2-axis alignment syntax inconsistent with similar syntax 
elsewhere in CSS, e.g. for `scroll-snap-align` or 
`background-position`.

An alternate idea is to use the slash to separate the fallback from 
the initial. Imho this also helps make it clearer that we're declaring
 a fallback alignment, since slashes are used to indicate alternates 
in general typographic usage.

Examples:

```
justify-content: space-around / center; /* space-around, fall back to 
center - both axes */
place-content: space-around / center; /* space-around both axes, fall 
back to center */
place-content: space-around start / center; /* space-around b-axis, 
start x-axis, fallback center */
```

(I think it's probably best to consider this for Level 2, leaving 
fallback keywords out for Level 1 so we can take Level 1 to CR asap.)

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/1002 using your GitHub 
account
Received on Thursday, 2 February 2017 23:22:39 UTC

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