Page 1 of 1

[SOLVED] Skin variable question

Posted: Fri Jul 24, 2020 11:32 am
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!

Re: Skin variable question

Posted: Sat Jul 25, 2020 8:50 pm
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.)

Re: Skin variable question

Posted: Sun Jul 26, 2020 2:57 pm
by Blackcat12
Thank you so much for the feedback and guidance. It is very much appreciated!

Re: Skin variable question

Posted: Sun Jul 26, 2020 4:21 pm
by drakinite
No probs! Good luck!