Farbe des Hover-Hintergrunds für Nav-Klassen-Buttons ändern

Hi, found this discussion:

I tried to adapt to my case which is how to change the background color for nav buttons when hovering them (not when they are active). My poor CSS knowledge did not suffice… Help appreciated :wink:

1 „Gefällt mir“

That topic is outdated, so I’m going to archive it…

If you’d like to change the hover color for these filter buttons above the topic list:

You can do this, since we use some variables:

:root {
  --d-nav-bg-color--hover: #fab1ed; 
}

There are a whole set of variables for this nav that can be edited in the same way:

For general reference: Make CSS changes on Your Site

2 „Gefällt mir“

Thanks a lot @awesomerobot ! But I added that to my custom CCS, no change is visible. I tried a “fixed” color as well, same, no effect.

:root {
  --d-nav-bg-color--hover: var(--quaternary); 
}
1 „Gefällt mir“

You could try


:root {
  --d-nav-bg-color--hover: var(--quaternary) !important; 
}

No, still no change, that’s weird.

1 „Gefällt mir“

Have you created a theme component to add the CSS to?

1 „Gefällt mir“

Yes, my other CSS code is working:

1 „Gefällt mir“

I’ve never used :root I’ve always used the class names, I’ll have to take a look into it now :eyes:

1 „Gefällt mir“

It worked for me… without !important

How did you did it? :grin:

1 „Gefällt mir“

Same as you… it didn’t change anything on the top of latest though, it changed admin menu items and user preference menu items

Ok in my case no change visible on any of those. :confused:

1 „Gefällt mir“

This might be daft but are you clicking save?

1 „Gefällt mir“

Yeap I did

1 „Gefällt mir“

It’s not essential, let’s wait until someone else tries… @Steven if you can try that as you are admin on my site…

1 „Gefällt mir“

Just to make sure, you have the theme component with the change applied to the theme you’re using, right?

2 „Gefällt mir“

Yes, and I have only one theme.

1 „Gefällt mir“

If you try a cache refresh (Ctrl/Cmd+Shift+R), does that by chance make it show up?

1 „Gefällt mir“

No change.

1 „Gefällt mir“

Ok, so, as I have two other Discourse sites, I tested that on another one, and it… worked !
Now there is something on my dessein-tech.com site with interferes with that mod.

I deactivated all components one by one to no avail. :confused:

1 „Gefällt mir“