How to change the card header color of a specific card? #925
-
I have a card in UI as follows:
I provide the class in the css file as:
But it does not provide the color I am specifying. I have tried the commented option also. |
Beta Was this translation helpful? Give feedback.
Answered by
cpsievert
Nov 29, 2023
Replies: 1 comment 1 reply
-
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 page_fixed(
theme = bs_theme() |>
bs_add_rules("
.thingsti {
background-color: #fc6a03 !important;
color: white;
}
"),
card(
card_header("Header", class = "thingsti"),
"Body"
)
) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
udurraniAtPresage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.