Skip to content

Instantly share code, notes, and snippets.

@hipertracker
Created September 12, 2012 20:30
Show Gist options
  • Save hipertracker/3709661 to your computer and use it in GitHub Desktop.
Save hipertracker/3709661 to your computer and use it in GitHub Desktop.
SCSS vs LESS
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.
Copy link

ghost commented Oct 21, 2012

LESS:
.kolor() {
color: red;
}
.tlo() {
background-color: yellow;
}

.klasa {
border: 1px solid red;
.tlo;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment