[SOLVED] Skin variable question

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

Moderator: jiri

Blackcat12
Posts: 58
Joined: Mon Dec 31, 2012 11:41 am
Contact:

[SOLVED] Skin variable question

Post by Blackcat12 »

Hi,
I am not a coder, but have been working on my own custom skin for MM5. I about have what I am looking for, but struggling with finding away to modify the text color in three areas. I am attaching a screen shot and hope you may be able to lend some guidance.

http://www.mediafire.com/view/sn356dxxa ... 0Theme.jpg

Thanks!
drakinite
Posts: 117
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: Skin variable question

Post by drakinite »

For the top three, search for this selector in the code.

Code: Select all

.lvItem[data-selected]
That should also apply to the listview item on the bottom and the now-playing item on the right, but if you need to override them you can. This is the selector for the gridrow:

Code: Select all

.lvItem.gridrow[data-selected]
And this will work for the now playing list items:

Code: Select all

div[data-id=nowplayinglistContainer] .lvItem[data-selected]
If you need a separate color/background color for when it's focused, add your own selector with [data-focused], for example:

Code: Select all

.lvItem[data-selected][data-focused]
If you need to learn more about how CSS selectors work, the Mozilla Developer Network (MDN) is a fantastic resource. And if you don't know how Less works, I believe their site is here.

Here's the LESS that I added to test those selectors:

Code: Select all

div[data-id=nowplayinglistContainer] .lvItem[data-selected]{
    color: red!important;
}

div[data-id=nowplayinglistContainer] .lvItem[data-selected][data-focused]{
    color: green!important;
}

.lvItem[data-selected]{
    color: yellow!important;
}

.lvItem.gridrow[data-selected]{
    font-weight: bold!important;
}
(Note that using "!important" isn't the greatest idea unless you have to. I just decided to add that because I didn't want to bother with CSS overrides elsewhere in the theme. Just used that code for demonstration.)
Blackcat12
Posts: 58
Joined: Mon Dec 31, 2012 11:41 am
Contact:

Re: Skin variable question

Post by Blackcat12 »

Thank you so much for the feedback and guidance. It is very much appreciated!
drakinite
Posts: 117
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: Skin variable question

Post by drakinite »

No probs! Good luck!
Post Reply