problem : I have to set values of css dynamically . I upload css file in static resource

css is like :

  p {
     font-size : {v.font_size}

component :

<aura:attribute name="font_size" type="string" default ="30px">

how can i set this attribute value in static resource css when including this static resource in component ... Is it possible to do that .. if not then how to assign values dynamically in static resource


1 Answer 1


This doesn't seem to be right way of applying the styles.

Usual and recommended path is to define style classes in static resources, use them in component, then dynamically apply classes in the HTML markup.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .