W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

[csswg-drafts] [css-inherit] New rule to make non-inherited properties inheritable (#4395)

From: Indrek Paas via GitHub <sysbot+gh@w3.org>
Date: Fri, 04 Oct 2019 01:25:50 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-502376715-1570152349-sysbot+gh@w3.org>
indrekpaas has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-inherit] New rule to make non-inherited properties inheritable ==
I had a situation where child elements had to inherit multiple non-inherited properties from a parent. I used the standard `inherit` keyword, but it led to code repetition and sparked an idea for a more implicit approach.

What if inheriting properties explicitly from a parent

```css
.parent {
  border-radius: 50%;
}

.child {
  border-radius: inherit;
}
```

could become implicit with an `!inherit` rule?

```css
.parent {
  border-radius: 50% !inherit;
}
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4395 using your GitHub account
Received on Friday, 4 October 2019 01:25:52 UTC

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