Are you not allowed to use math defined variables within other math
variables like this?
Yep, I started translating a basic grid to lessCSS, but extending
mixins weren't really powerful enough to use effectively. Hoping class
extensions with xCSS will be the ticket!
I'm trying to convert typographic "css framework" baseline_type into
dynamic style sheet. I've found another bug.
vars{
$base_font_size = 14px;
$line_top_span = 6px;
$line_height = 20px;
$list_margin_left = 20px;
$h_size = [$line_height * 2]; // gives 40px OK
$h_top_span = [$line_height / 2]; // gives 10px OK
}
but when I set $line_height by sum of two previously set variables it
fails
vars{
$base_font_size = 14px;
$line_top_span = 6px;
$line_height = $base_font_size + $line_top_span; // gives 20px OK
$list_margin_left = 20px;
$h_size = [$line_height * 2]; //gives 23px FAIL
$h_top_span = [$line_height / 2]; //gives 17px FAIL
this works:
$h_size = [($line_height) * 2]; //gives 40px OK :)
$h_top_span = [($line_height) / 2]; //gives 10px OK :)
tested on verion 1.0.1
I think autobracketing variables in the formulas should be
worthful. ;)
Cheers