# Apply \`vector-effect: non-scaling-stroke\` for all SVG elements by default?

**URL:** <https://forum.inductiveautomation.com/t/apply-vector-effect-non-scaling-stroke-for-all-svg-elements-by-default/68774>\
**Category:** Ignition\
**Created:** [January 19, 2023, 5:38am UTC](https://forum.inductiveautomation.com/t/apply-vector-effect-non-scaling-stroke-for-all-svg-elements-by-default/68774 "2023-01-19T05:38:31Z")\
**Posts on this page:** 2\
**Page:** 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:** [January 19, 2023, 5:38am UTC](https://forum.inductiveautomation.com/t/apply-vector-effect-non-scaling-stroke-for-all-svg-elements-by-default/68774/1 "2023-01-19T05:38:31Z")

</div>

I'm grasping at straws here, but is it possible to set SVG elements to not scale their strokes by default?  
It's tedious having to do this all the time for every element in every SVG ☹

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/f/ef50aea7b9cb805cff366e75fabdfe32dd43834e.png)

Also, can someone tell me why applying this to the root element style doesn't affect its children?

---

<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:** [January 19, 2023, 9:58am UTC](https://forum.inductiveautomation.com/t/apply-vector-effect-non-scaling-stroke-for-all-svg-elements-by-default/68774/2 "2023-01-19T09:58:44Z")

</div>

vector-effect is not a style, but a svg attribute.  
Most svg attributes can be defined with styles too, so does vector-effect.  
But almost no attributes have any effect on its children.  
Also you cant apply it as a style to the svg

You could however add  
`path{vector-effect:non-scaling-stroke}` or `svg * {vector-effect:non-scaling-stroke}` to your stylesheet  
or if you dont want to break all svgs:

```auto
.psc-YourClass * {vector-effect:non-scaling-stroke}

```
