Changing a font weight of label with custom styles

What should I do in order to change a font weight in the content of the label using custom styles?
Simply making a new style with a font-weight property and applying it to the label does not work.

I made two styles that I applied to the first and second label. Other properties, like background-color works properly but font-weight is not applied. I can workaround this problem by refering to component id but this solution does not satisfy me - I have many labels which use the same styles.

On my form everything works fine. I think the problem is with your CSS.
Font-weight can be defined by number value (for example 300 for light, 600 bold etc) or text value - both work fine for me.
Also, try not to use “!important”, it’s bad practice.


Zaznaczenie_580

1 Like