# Perspective Custom style attributes

**URL:** <https://forum.inductiveautomation.com/t/perspective-custom-style-attributes/65687>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 26, 2022, 12:14am UTC](https://forum.inductiveautomation.com/t/perspective-custom-style-attributes/65687 "2022-10-26T00:14:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 26, 2022, 12:14am UTC](https://forum.inductiveautomation.com/t/perspective-custom-style-attributes/65687/1 "2022-10-26T00:14:17Z")

</div>

Is there any way of adding custom CSS values to a style in Perspective?  
We are constantly having to individually add a value and key pair to the style section of an object.

```auto
"vector-effect": "non-scaling-stroke"

```

Obviously this works just fine, but there is no way I know of to add this to the Style Class that we are having to add to this as well.

---

<div class="post-metadata">

**Author:** ![Sam\_Corbett](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@Sam\_Corbett](https://forum.inductiveautomation.com/u/Sam_Corbett)\
**Post date:** [October 26, 2022, 12:22am UTC](https://forum.inductiveautomation.com/t/perspective-custom-style-attributes/65687/2 "2022-10-26T00:22:47Z")

</div>

Perhaps this is what you're looking for? Available in early access. Otherwise you can manually add the CSS to the project and manually type them into your elements.

Pay mind to the prefixing of the classes/selectors if using this:  
[https://forum.inductiveautomation.com/t/new-stylesheet-resource/64787/1](https://forum.inductiveautomation.com/t/new-stylesheet-resource/64787/1)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 26, 2022, 1:58am UTC](https://forum.inductiveautomation.com/t/perspective-custom-style-attributes/65687/3 "2022-10-26T01:58:31Z")

</div>

> [@David\_Stone](#):
>
> but there is no way I know of to add this to the Style Class

Actually you can using CSS injection. Just add it into an unused CSS property that takes text input, like the background image prop.

```python
;vector-effect: non-scaling-stroke

```

The `;` at the start closes the background-image prop essentially landing you with this in the resulting CSS

```python
background-image:;vector-effect: non-scaling-stroke;

```
