Hello and thanks for the awesome component
I am trying to customize the button color a bit more. It looks like to change the hover properties (either button color or text color), I have to change the CSS. But I can’t figure out exactly where to do that. Any help?
1 Like
Lilly
June 29, 2023, 10:45pm
2
hi @xomiamoore
you can try something like this and adjust the colors and other properties to your needs:
in common css of a theme or theme component:
// * button background * //
.banner-box .button-container .close,
.banner-box .button-container .toggle {
background: silver;
&:hover {
background: yellow;
}
}
// * button text colors //
.banner-box .button-container .close .d-button-label,
.banner-box .button-container .toggle .d-button-label {
color: red;
&:hover {
color: blue;
}
}
// * arrow icon colors * //
.banner-box .button-container .close svg,
.banner-box .button-container .toggle svg {
color: grey;
&:hover {
color: black;
}
}
you can also use hexadecimal color codes (ie: #000000
) or theme variables (ie: var(--secondary
)) for colors.
4 Likes
Canapin
(Coin-coin le Canapin)
June 30, 2023, 7:47am
3
Hi Mia,
As it’s still good to know, we have a tutorial for this kind of modification:
Want to make some CSS changes on your Discourse site but not sure where to start? You’ve come to the right place!
You only need to read this topic if you’re very new to CSS. If you already know how to write and add CSS to your Discourse site, then you will most likely not need to read this topic.
We’ll cover a few subjects.
We’ll start with a brief introduction of what CSS is and some terms that you need to know. We will then move on to how you can add CSS to your Discourse site. Final…
3 Likes
system
(system)
Closed
September 27, 2023, 9:10am
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.