Menu Tree height in stylesheet

I'm new to perspective. I'm just trying to create a style to apply to a menu tree, so I can set amongst other things the height of the row to reduce the white space around the text. I can do it on a per item basis by adding a value "height" and setting the value in the style, but doing it on a per item basis will be unmanageable.
I've created a style "NavMenu" to be used by all the relevant items, I can't see a way of controlling this in the regular style so moved to css. In css I can control the usual styles e.g. font-size, but I'm struggling to get the height to take the setting.

.psc-NavMenu {
	font-size: 50px;
	height: 200;	
}

For the above the font size applies, but I'm missing something for the height. Any assistance appreciated!

I'm not sure where you have this style class applied, but I tested with the NavMenu class applied in itemStyle and style properties. In both cases the height rule was being overwritten by another default style class for the menu tree.

I was able to get the rule from the custom style class to take precedence by adding the !important flag to the end of the height rule, as such

.psc-NavMenu {
	height: 200px !important;
}

Still a bit strange because when I read the docs for the advanced stylesheet I thought it's rules would overwrite any default themes, but maybe I misread.

Awesome, that's sorted it, thanks!

1 Like