XF 2.1 [solved] New LESS @variable ineffective problem

ShikiSuen

Well-known member
I tried defining a new variable force-unifying all node icon width settings.
However it doesn't work. (the last two lines in the screenshot seems to read my new variable as zero, not the 40px I set for it.)
I wonder any mistake I have made here.

1587788572342.png
 
Hard to debug with a code in a screenshot :P
I apologize for that. I already reported this thread to moderator for removal.

The problem is that the following doesn't work even if I defined @forumnodeiconwidth above:

padding-left: ~"calc(@forumnodeiconwidth + @xf-paddingSmall)"

but this works (100px as a static value):

padding-left: ~"calc(100px + @xf-paddingSmall)"

Seems that this is a LESS syntax question.
 
Problem solved. I changed the calc expressions used in the final two lines as the following:

max-width: 100%; margin-left: 0px; padding-left: calc(@forumnodeiconwidth ~"+" @xf-paddingSmall);
background: #f5f9ff; box-shadow: inset calc(@forumnodeiconwidth) 0em #fff; text-align: initial;
 
Top Bottom