Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

[cds] Full width card #6155

Answered by hippee-lee
mathisloge asked this question in Q&A
Jul 15, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

An easy way to do this is to change the cards --width custom property. It ships with fit-content but you can target your cards and set it to something that suites your needs.
essentially, you need to write css that targets the cards you want to be full width. The core components expose a variety of custom properties to help consumers override / customize what gets shipped by default. You can see the list for cards here, in the API table at the bottom of the page.

    <style>
      cds-card {
        --width: 100%;
      }
    </style>

Here is a simple example.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mathisloge
Comment options

Answer selected by mathisloge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants