less.ruby icon indicating copy to clipboard operation
less.ruby copied to clipboard

Nested CSS Functions

Open daz-codes opened this issue 16 years ago • 0 comments

Can a nested rule refer to an argument from its parent?

This is what I want to do: .box(@width:200px){ width:@width; .column{margin:@width/5} } .content{.box(600px);}

And this should produce:

.content{width:600px;}
.content .column {margin:120px;}

At the moment I just get an error when I try to include any nested rules with CSS functions.

cheers,

DAZ

daz-codes avatar Oct 09 '09 18:10 daz-codes