Page 1 of 1

MM5 skins

Posted: Thu Aug 10, 2023 9:11 pm
by addison10404
Is it possible to use images in the skinning code to add backgrounds to elements such as the player or left panel?

Re: MM% skins

Posted: Tue Aug 15, 2023 1:20 am
by drakinite
You sure can. Regarding selectors: we don't have documentation on what CSS selectors work on what element, because there are thousands of possible combinations that can be done to suit each skinner's need. Try [data-control-class="MediaTree"] if you're specifically thinking about the media tree, whether it's on the left or somewhere else, or [data-dock-left] if you really mean the entire left panel, no matter what's in it. Then try [data-control-class="Player"] for the player.*
Regarding background images: here's a page explaining how to use the CSS background-image property: https://www.w3schools.com/htmL/html_ima ... ground.asp - if your addon file tree is like this:
- info.json
- skin/
- skin_base_add.less
- images/
- image.png
then I think url('skin/images/image.png') should work, as an example.

*For people somewhat familiar with HTML, the trick (i should really write this down in the documentation) to finding the right selector is to use the devtools element picker (top left corner) to locate the element you're trying to make a selector for, and look at its attributes and classes to find something that seems to match. Often the [data-control-class="X"] is useful when you're trying to style a particular type of element.