<html> <head> <link rel="stylesheet" href="style.css" type="text/css" /> <title>Mixins Scope</title> </head> <body> <div class="myclass"> <h2>Welcome to Yiibai Yiibai</h2> <p>LESS is a CSS pre-processor that enables customizable, manageable and reusable style sheet for web site.</p> </div> </body> </html>
.mixin() { @bgcolor: #C0C0C0; } .myclass{ .mixin(); background-color: @bgcolor; }
lessc style.less style.css
.myclass { background-color: #C0C0C0; }