Replies: 1 comment
-
Is this the desired effect? https://codepen.io/claviska/pen/rNXKLML?editors=0100 You can zero out the padding with the following CSS. sl-card::part(body) {
padding: 0;
} Or you can hide the body altogether with something like this: sl-card::part(body) {
display: none;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using sl-card without body. But the default component adds padding to the this default slot. Thus I get an content empty box with 20px padding all round.
I was tried to hide or set the padding for the default slot by styling, but these are defined in class selector ''card__body", which is not overridable outside of the shadow dom.
Style fragment from Shoelace code base:
Code fragment for Shoelace code base:
<slot part="body" class="card__body"></slot>
I tried, but will not work outside of shadow dom
sl-body::part(body) {
display: none;
}
Make the body part optionable much like the header, image and footer.
Beta Was this translation helpful? Give feedback.
All reactions