2

There's quite a bit of space left where title and actions go. Ideally I'd like to remove it. What are the options here?

enter image description here

3

if you are referring to the top padding: enter image description here

then you can scope your css as follows:

.THIS header.slds-card__header.slds-grid{
    padding-top:0px;
}

Feel free to modify it as needed.

If you have other cards, it will affect all of them If you have some cards that would not need the change in styling, i would suggest adding a custom class to your title and scope accordingly:

.THIS.customCardClass > header.slds-card__header.slds-grid{
    padding-top:0px;
}

Sample Card:

<lightning:card class="customCardClass ">
    <aura:set attribute="title">
        Hello!
    </aura:set>
    <aura:set attribute="footer">
        <lightning:badge label="footer"/>
    </aura:set>
    <aura:set attribute="actions">
        <lightning:button label="New"/>
    </aura:set>
    <p class="slds-p-horizontal--small">
        Card Body (custom component)
    </p>
</lightning:card>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.