XF 2.1 CSS not defined in style properties?

cmpe

Active member
Working on XF1 -> XF2 upgrade plans and first step is to trying to re-create the styling for XF2 but I can't seem to find the appropriate styling property as easily as I was able to for XF1 styling.

Do some css definitions not exist in style properties and just manually needed to be added to extra.less?

For example, I am looking to change the color of .block-desc so I'm expecting this to be in the Blocks group but it doesn't exist.
 
Last edited:
There are fewer style properties in XF2 so yes, you will need to use EXTRA.less to apply custom styling in a lot of cases.

Even when there are style properties available, you can still use EXTRA.less should you wish - some people prefer to do so.
 
There are fewer style properties in XF2 so yes, you will need to use EXTRA.less to apply custom styling in a lot of cases.

Even when there are style properties available, you can still use EXTRA.less should you wish - some people prefer to do so.
Thanks Brogan!

So it looks like even when I use EXTA.less, I have to use !important to override, is that the only option? I've been trying to not have to resort to using that but not sure if there's some XF2-fu or better convention I should be using instead.
 
It shouldn't be necessary to use !important in most cases, and it should be avoided wherever possible - you will just likely need to use more specific selectors.
 
We're just finding the same thing - and I wondered if it's normal to be adding so much to extra.less for our 2.1 upgrade (and to be feeling that lots of things are missing from the style properties) and it seems so.

Seems like a retrograde step, removing a whole host of easy-to-edit style properties that you could quickly apply. Anyone know the reasoning behind it?
 
Back
Top Bottom