Yes to change it at runtime. The css reacts to variable changes and I want to be able to use a variable for the width of a component.
:root{
example-component-width:30px
}
Later I want to be able to change the width to a different width. I guess I can just create two different classes and add/remove those classes. However my preference is to be able to change the variable value.
I get that there is a simpler way to change a style by adding/removing classes to a component. However, I was just oversimplifying what I am wanting to do to get the base question answered. In most cases I agree that adding/removing a class is a much simpler and more elegant solution. Thank you everyone for the advice/information. I plan on adding/removing classes for most cases I just wanted to know if there was a way to do it if I need to do it at some point.