<html> <head> <link rel="stylesheet" href="style.css" type="text/css" /> <title>The !important keyword</title> </head> <body> <h1>Welcome to Yiibai Yiibai</h1> <p class="para1">LESS is a CSS pre-processor that enables customizable, manageable and reusable style sheet for web site.</p> <p class="para2">LESS is a CSS pre-processor that enables customizable, manageable and reusable style sheet for web site.</p> </body> </html>
.mixin(){ color: #900; background: #F7BE81; } .para1{ .mixin(); } .para2{ .mixin() !important; }
lessc style.less style.css
.para1 { color: #900; background: #F7BE81; } .para2 { color: #900 !important; background: #F7BE81 !important; }