Fixed Font-weight incorrect processing in templates

CyberAP

Well-known member
If I open a template that contains property group and include there my font-weight with unusual number (for e.x. 300) it automatically converts to XenForo default, i.e. Font-weight: normal. Sometimes I get font-weight: bold. I think the same thing will happen with font-weight: light.
 
I tested it and got a different result. I edited the body class in xenforo.css. I added font-weight:

Rich (BB code):
body
{
	@property "body";
	font-weight: 300;
	font-family: 'Trebuchet MS', Helvetica, Arial, sans-serif;
	color: @contentText;
	word-wrap: break-word;
	line-height: 1.27;
	@property "/body";
}

It was converted to this upon saving and reloading the template:

Rich (BB code):
body
{
	@property "body";
	font-weight: 300px;
	font-family: 'Trebuchet MS', Helvetica, Arial, sans-serif;
	color: @contentText;
	word-wrap: break-word;
	line-height: 1.27;
	@property "/body";
}

300px isn't even valid.

http://www.w3schools.com/cssref/pr_font_weight.asp
 
well I use the "word" parameters vs the digits..
they seem to work correctly.
i.e.:
normal | bold | bolder | lighter | inherit

this always worked for me...
i never touched the digits because I think I read somewhere that most fonts only have few weights available .
so if the weight doesnt exist, it should default to the next available, but sometimes depending on browser it could give unpredictable results.
and if you want to use 300, it will still display 400, if it is the only one available. (this is font dependant)

but you are right, adding "px" to the value is definetively wrong.
Luc
 
Fixed now. This only occurred with a font-weight rule specifically. The font rule handles it, though it does just convert everything to bold.
 
Top Bottom