Re: [webcomponents] [Shadow] Section 2.4 - CSS inherit by default? (#314)

> On the other hand, `<b><button>hello</button></b>` does not bold the text inside the button so the platform itself is quite inconsistent at the moment.

Indeed it is not get bolden.  Looking at this in Chrome's inspector, the `<b>`'s style is inherited,
but is reset by UA stylesheet (and Chome's `<button>` doesn't use UA shadow btw).

The same goes for `<b><input value="foo"></b>`, in this case the content of `<input>` doesn't
get bolden, but `<input style="font-weight: bold" value="foo">` works.
Likewise, `<button style="font-weight: bold">hello</button>` also works.

> `:host {font-size: inherit}` would do since ShadowRoot doesn't generate a CSS box (like an element with `display: contents`).

Isn't `:host {font-size: inherit}` from shadow tree same as `div#host {font-size: inherit}` from
the document?  The shadow host inherits `font-size` style from its parent, but does
it mean it will also be inherited by its shadow?
Or did you mean `:root`?  Even though it does not create a box, it should be able to specify
some property to be inherited.

> How a slotted element styled and whether style should inherit from slot elements that got assigned of those elements is a separate question. Let's not conflate that discussion into here.

Do we have already a filed issue for this?


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/314#issuecomment-143645023

Received on Monday, 28 September 2015 05:40:40 UTC