learn sass

June 12, 2020

It’s a CSS preprocessor/extension Allows us to use features that don’t exist yet in CSS compiled to regular CSS form (.scss/sass)

Variables in CSS

$primary: "blue"

mixins and functions

@mixin transform  ($property) {

}

.box{
    @include transform(rotate(30deg))
}

Inheritance

%message-shared {
    border: 1px solid #ccc;
}

inherit

.message {
    @extend % message-shared;
}

.success {
    @extend % message-shared;
    padding: 1px;
}

Operators

*, /, -, +

Conditionals

@if $direction === up {

}
@else if $direction === right {

}
@else {

}
@error {

}

Loops

each in

imports

Allows imports from other files


Profile picture

Written by Davis Bwake A fullstack developer who likes JavaScript and everything web 3.0(BlockChain..) follow me on twitter

My tech stack is HTML, CSS,JavaScript, ReactJS, NodeJS, Solidity

Am currently open to remote job oppurtunities.

Checkout my projects

YouTube