Re: [WICG/webcomponents] Should shadow host have `display: block` by default? (#426)

> ```css
> :host { display: block; }
> ```

My problem with GrapesJS was that my custom webcomponent was by default displaying vertical rather than horizontal placeholders when dragging and dropping components on the editor canvas.
It turns out GrapesJS is aware of the `display` property (a tiny bit of surprise there) and uses it to decide which line (h or v) to display, and where. 
I was not aware that currently the default is `inline`, which kinda at the same time does and doesn't make sense. I guess the default needed to be somehow decided upon and it regardless of which one would be chosen it would still be just 50% of cases covered.

With custom webcomponents to address the top-level node one uses the `:host {...}` style - as mentioned by @rniwa. I just wish the documentation for GrapesJS would mention this.

Anyways, your suggestion saved my day. Thank you!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/426#issuecomment-1542062647
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/426/1542062647@github.com>

Received on Wednesday, 10 May 2023 11:48:39 UTC