# Combining custom theme pseudo classes and element states

**URL:** <https://forum.inductiveautomation.com/t/combining-custom-theme-pseudo-classes-and-element-states/62293>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [July 26, 2022, 7:43am UTC](https://forum.inductiveautomation.com/t/combining-custom-theme-pseudo-classes-and-element-states/62293 "2022-07-26T07:43:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 26, 2022, 9:56am UTC](https://forum.inductiveautomation.com/t/combining-custom-theme-pseudo-classes-and-element-states/62293/4 "2022-07-26T09:56:24Z")

</div>

Good job finding a solution.

Its really a shame the theme.css files are not accesable in the designer,  
This would make this a lot easier:

> [@Janis\_Voss](#):
>
> !important flag to the Element State colors. I guess it is necessary due to css rules.

Due to some styles being assigned inline instead of classes sometimes its just required to use !important yeah...

> [@Janis\_Voss](#):
>
> Second, a user cannot easily define and assign a new Ignition style in its own project anymore.

What ive been doing a lot, and im not saying its perfecet either, but its just a lot easier to acces in the designer... Is "ccs injection", you can inject css into the style classes using inverted brackets.  
You'll find a bunch of things when you look it up in the forum, as seems my methode has become quite known on here over the year xD So there must be some benefit to it eventho its not perfect 😛

> [@Perspective Table How to Handle Right Click Copy Event](https://forum.inductiveautomation.com/t/perspective-table-how-to-handle-right-click-copy-event/47618/5):
>
> i might have a hacky solution to make it invisible… if you create a style class and paste this }.contextMenuCommon.ia\_contextMenu{display:none;}{ into for example the background image. The copy popup will no longer be visible and clickable. It still triggers the event tho. Also this will now work on all tables you have in the project, so if do want it somewhere else you will have to change it a bit to be more specific. You can “inject” css in the styles. You can probably also c…

Its a bit harder to understand or setup, but it might be easier for a second user to find the style and change something in it if its already predefined and named correctly...

Its also great for combinging classes, for more examples look up ".psc-" or something

> [@PowerChart X-Trace Time Color](https://forum.inductiveautomation.com/t/powerchart-x-trace-time-color/55077/10):
>
> It is possible to select a full line in the xtrace. with :nth-child() css selector. Yo will have to be sure it will always be on the same spot though. .ia\_timeMarker \> g \> g \> g \> g:nth-child(2) for the first text +1 for every below [image] For something so specific you should add in the styleclass infront too. .psc-folder\/styleclassName infront and add an (empty) styleclass with the name folder/styleclassName to the component like normal ( / of folders are changed to \/ in css ) (psc- …

---

_[View the full topic](https://forum.inductiveautomation.com/t/combining-custom-theme-pseudo-classes-and-element-states/62293)._
