W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2016

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

From: Jonathan Neal via GitHub <sysbot+gh@w3.org>
Date: Fri, 18 Nov 2016 03:24:39 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-190227300-1479439476-sysbot+gh@w3.org>
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

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