A collection of useful SASS Mixins
This Package Include
- Property Name
- Property Values
- Vendor Prefixes
.class {
@include prefixer(transition, all .3s ease, webkit moz o);
}
.class {
-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
}
- Property Value
.class {
@include opacity(.5);
}
.class {
zoom: 1;
filter: alpha(opacity=50);
opacity: 0.5;
}
- Animation Name
@include keyframes(BigFont) {
from {
font-size: 10px;
}
to {
font-size: 20px;
}
}
@-webkit-keyframes BigFont {
from {
font-size: 10px;
}
to {
font-size: 20px;
}
}
@-moz-keyframes BigFont {
from {
font-size: 10px;
}
to {
font-size: 20px;
}
}
@keyframes BigFont {
from {
font-size: 10px;
}
to {
font-size: 20px;
}
}
- Color
- Opacity
.class {
@include overlay(black, .5);
}
.class {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
No
.class {
@include centerer();
}
.class {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
- Dimensions Width And Height Must Be The Same
.class {
@include circle(100px);
}
.class {
width: 100px;
height: 100px;
border-radius: 50%;
}
No
.class {
@include placeholder {
color: #EEE;
}
}
.class ::-webkit-input-placeholder {
color: #EEE;
}
.class ::-moz-placeholder {
color: #EEE;
}
.class :-ms-input-placeholder {
color: #EEE;
}
.class :-moz-placeholder {
color: #EEE;
}
No
.class {
@include cover();
}
.class {
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}