Created
September 12, 2012 20:30
-
-
Save hipertracker/3709661 to your computer and use it in GitHub Desktop.
SCSS vs LESS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LESS: | |
.kolor { | |
color: red; | |
} | |
.tlo { | |
background-color: yellow; | |
} | |
.klasa { | |
border: 1px solid red; | |
.tlo; | |
} | |
Generated CSS: | |
.kolor { | |
color: red; | |
} | |
.tlo { | |
background-color: yellow; | |
} | |
.klasa { | |
border: 1px solid red; | |
background-color: yellow; | |
} | |
SCSS: | |
@mixin kolor { | |
color: red; | |
} | |
@mixin tlo { | |
background-color: yellow; | |
} | |
.klasa { | |
border: 1px solid red; | |
padding: 50px; | |
@include tlo; | |
} | |
Generated CSS: | |
.klasa { | |
border: 1px solid red; | |
padding: 50px; | |
background-color: yellow; | |
} | |
Sass is superior, it generates only what is used. Less is merging everything. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LESS:
.kolor() {
color: red;
}
.tlo() {
background-color: yellow;
}
.klasa {
border: 1px solid red;
.tlo;
}