Skip to content

How to change the card header color of a specific card? #925

Closed Answered by cpsievert
udurraniAtPresage asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like you're running into a specificity issue that we'll hopefully be improving in the near future, but in the meantime, you can fix it with an !important flag.

page_fixed(
  theme = bs_theme() |>
    bs_add_rules("
      .thingsti {
         background-color: #fc6a03 !important;
         color: white;
       }
    "),
  card(
    card_header("Header", class = "thingsti"),
    "Body"
  )
)

Replies: 1 comment 1 reply

Comment options

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

Answer selected by udurraniAtPresage
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