Because <rh-accordion> shadowRoot #container is display: contents, setting a margin or padding on this element won't apply when trying to provide spacing between elements for page content flow. I suggest adding a display: block to the :host in shadow CSS.
Attached is an image of the accordion and header element with no spacing. In order to provide spacing here it would be preferable to do a combo selector between a header and a sibling accordion:
Somewhat related to @bennypowers discussion on table accordion , or is at least is what brought me to think about the spacing between the header/accordion on the element code pages.
Because
<rh-accordion>
shadowRoot#container
isdisplay: contents
, setting a margin or padding on this element won't apply when trying to provide spacing between elements for page content flow. I suggest adding adisplay: block
to the:host
in shadow CSS.Attached is an image of the accordion and header element with no spacing. In order to provide spacing here it would be preferable to do a combo selector between a header and a sibling accordion:
Somewhat related to @bennypowers discussion on table accordion , or is at least is what brought me to think about the spacing between the header/accordion on the element code pages.