Targeting the CSS of a specific menu item

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

Targeting the CSS of a specific menu item

Post by tbm72 »

Does anyone know how to target the css element of a specific menu item. I'm trying to change the colour of the circle selector for the chosen skin under:

Menu>View>Skin

It looks like it takes on the colour specified in:

@materialColor: #fb8c00; // PRIMARY COLOR

But I want to make it different than that one. Is it possible to target that menu item specifically?
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: Targeting the CSS of a specific menu item

Post by drakinite »

Do you mean this radio button here?

Image

If so, unfortunately I don't think it's possible to uniquely identify the View -> Skin submenu in CSS. As far as I'm aware, if you want to change the color of this radio button, you'd have to change the color of all radio buttons across the UI.

If that's what you're looking for, then you can do it via this selector:

Code: Select all

input[type="radio"]:checked, input[type="checkbox"]:checked
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

Re: Targeting the CSS of a specific menu item

Post by tbm72 »

Thanks, that sounds perfect!

I'm not in front of my PC to try it right now but I don't mind if all radio buttons are affected (in fact it's probably good if they are).

I've used @materialColor to change some parts of the UI to a darker colour. When it's also applied to the radio buttons it makes them hard to see because of the radio button's small size so I just wanted those to be a lighter colour.

Thanks for your help!
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: Targeting the CSS of a specific menu item

Post by drakinite »

No prob!

You can also use less's lighten/darken functions if you want to lighten or darken an existing color, btw: https://lesscss.org/functions/#color-operations-lighten
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

Re: Targeting the CSS of a specific menu item

Post by tbm72 »

Yes, that works perfectly, thanks! :)
Post Reply