[csswg-drafts] [css-values] skip individual shorthand values

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

== [css-values] skip individual shorthand values ==
Shorthand properties continue to roll in, such as `flex`, `grid-*`, 
and soon possibly 
[`place-*`](https://github.com/w3c/csswg-drafts/issues/595). However, 
their convenience is limited by the annoying side effect of reseting 
all of the longhand properties they represent. This sometimes happens 
within a rule, but most often occurs between multiple rules.

```css
.example {
  flex-basis: fit-content;
  flex: 2 2; /* ☠ RIP flex-basis ☠*/
  margin-left: 50px;
  margin: 10px 0 0; /* ☠ RIP margin-left ☠ */
}
```

Therefore, for simple shorthands, I propose a `skip` token be created 
which allows authors to prevent individual overrides within a 
shorthand. I would propose the skip token be an asterisk (`*`) because
 it already symbolically represents a wildcard.

```css
.example {
  flex: 2 2 *; /* → flex-grow: 2; flex-shrink: 2; */
  grid-area: * / * / * / auto; /* → grid-column-end: auto; */
  margin: 10px * 0; /* → margin-top: 10px; margin-bottom: 0; */
}
```

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

Received on Friday, 18 November 2016 03:24:45 UTC