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?
Lilly
(Lillian )
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.
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:
This guide explains how to make CSS changes on your Discourse site, including an introduction to CSS, where to add CSS in Discourse, and how to find the right selectors using browser inspection tools.
Required user level: Administrator
Summary
This guide covers:
A brief introduction to CSS and key concepts
How to add CSS to your Discourse site using theme components
Using browser inspection tools to find the right CSS selectors
Understanding CSS basics
C…