Perspective Style - Manually adding other css properties in the designer style "sheets"

Hi,

I would like to know how we can add other css properties in the designer style “sheets” as they are not all listed.

For instance, for my horizontal menu component, to change the size of a menu sub-item, I’m having to add the “height” property to the item style (Unless we do it in a different way?).
I can’t find how I can add the height property when I create a style, I can only add it manually on the component itself which isn’t great as I’d like to have all my styles visible in the main style folder.

I’m also having a weird one where the menu sub-item border property get ignored by my “navbar__sub-link” style, I need to add it manually to the item to remove it.
Any reason why?

Thanks,

image
image

You can insert other css props into styles by ending another property’s definition first and then defining the prop you want. Eg

;height: 30px

You can put that into any of the other style fields that use text field inputs

The ; ends the definition for the property you’re editing

Thanks, that’s good to know !

Unfortunately in the case of my horizontal menu sub-items it seems to be just ignoring the style like for the border property I had to add on the item itself.

Make me wonder why there isn’t just a free field then to add as many hand typed properties as we want?

Thanks again.

for height you will need to add !important to overrule the defaults, height is normaly not really the thing you should put in a class though.

; height:150px !important;

Perfect it does work thanks !

Why would you not put it in a class?
It’s a css property like any others.

Yes in normal html its important, but styling heights kinda messes with the designer.
Depends on the use i guess, go ahead if it works fine for you :slight_smile:

1 Like