<html> <head> <link rel="stylesheet" href="style.css" type="text/css" /> <title>Mixins & return values</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>
.padding(@x, @y) { @padding: ((@x + @y) / 2); } .myclass{ .padding(80px, 120px); // call to the mixin padding-left: @padding; // returns the value }
lessc style.less style.css
.myclass { padding-left:100px;}