- From: Joe Pea <notifications@github.com>
- Date: Sun, 27 Jan 2019 15:58:55 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 27 January 2019 23:59:17 UTC
One thing I don't think was covered much, is for example: if all custom elements have `display: block`, what happens when that custom element extends from `HTMLSpanElement` or similar? Seems like defaults should be inherited from parents. For example, I think it'd make sense that if you inherit from `HTMLElement` or `HTMLDivElement` that you get `display: block`, and that if you inherit from `HTMLSpanElement` or similar you get `display: inline`. So, instead of defining a single default for all elements, why not define some way for them to be inherited? For example, maybe `HTMLElement` has a `static display` property, and ```js class MyElement extend HTMLElement { static display = 'inline' } ``` This particular style may appear as a "user agent stylesheet" (as seen in Chrome devtools for example). Inheritance like this (with `static`, though a decorator could be an uglier option), seems to describe what is more realistically happening. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/426#issuecomment-457966377
Received on Sunday, 27 January 2019 23:59:17 UTC