Mixins
Filipe Linhares edited this page May 26, 2015
·
3 revisions
Has some mixins that will help you.
@import "mussarela/mussarela/addons";
Provide an easy way to set border radius to some directions.
Params
border-radius($radius);
.element {
@include border-top-radius(50px);
@include border-bottom-radius(50px);
@include border-left-radius(50px);
@include border-right-radius(50px);
}
Include clearfix.
.element {
@include clearfix;
}
Force an element to fill the screen or parent element.
.element {
@include coverer;
}
Center an element horizontaly.
.element {
@include h-center;
}
This mixins is a little bit big, so we've a page for him.
Params
position($position, $cordinates);
.element {
@include position(absolute, 10px 10px);
}
Provide an easy way to do CSS triangle.
Params
triangle($direction, $color, $size)
.element {
@include triangle(top, red, 10px);
}
Params
truncate ($width);
This mixin will truncate text, adding an ellipsis to represent overflow.
.element {
@include truncate(200px);
}
Align an element verticaly
.element {
@include v-center;
}
MIT © Filipe LInhares