If you want to globally change all components of a certain type, then you can use theming - if you look in the installation directory for data/modules/com.inductiveautomation.perspective/themes/, there’s a readme.md file that explains the general process. It’s a somewhat advanced feature, requiring some knowledge of raw CSS, but that’s your best solution for global, static customization of components.
Thank you! This is exactly what I was hoping to find.
Is there any documentation on themes yet?
As I am finding some odd CSS files in the system that I can’t figure out myself where they are coming from. They appear to be auto-generated, and they conflict with the theme styles. Here’s an example:
In the screenshot below my theme style (based on my best guesses from the other theme css files, has the correct selectors. But there is padding:0 from a file called PerspectiveComponents.7099e69e317255576124.css which I can’t track down why it would style the button with 0px of padding. (ie, there was padding in the component property, but it was removed, and it shouldn’t be “0xp” regardless…)
That padding: 0 is indeed coming from an automatically applied style generated by our code.
You can override by using a more specific selector, or force it with !important; see this post for more info:
@mperkins I am fine with maintaining class changes if it’s required to allow Perspective to be improved. But I don’t want to go against best practices I have learned for many years doing web design/CSS, we are on the same page there.
This seems like a possible oversight more than anything else.