Mixins

The _mixins.scss file is used to collect SASS mixins. We provide some very basic mixins; feel free to add yours!

Here's one of the mixins included, that can be used to generate CSS triangles:

@mixin triangle ($direction: up, $width: 12px, $color: red) {
    width: 0;
    height: 0;
    border: $width solid transparent;

    @if( $direction == left ) {
		border-right-color: $color;
    } @else if( $direction == right ) {
		border-left-color: $color;
	} @else if( $direction == down ) {
        border-top-color: $color;
    } @else {
        border-bottom-color: $color;
    }
}

We use cookies to give you the best possible website experience. By using CodyHouse, you agree to our Privacy Policy.