1.1.1 • Published 7 years ago

scss-shortcuts v1.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

scss-shortcuts

Useful mixins for faster and better front-end work. Just import and go.

Getting Started

Install the module with: npm install scss-shortcuts

Usage

Import scss file before referring to mixins. @import 'scss-shortcuts';

Mixins for extended CSS

BoxShadow:

Mixin CategotyExample Include
BoxShadow@include box-shadow(0, 2px, 5px, 0, #000000, inset);
BoxShadow (minimal)@include box-shadow(0, 2px, 5px);
BoxShadow (2shadows)@include box-shadow(0, 2px, 5px, 0, #000000, false,(-15px 2px 5px 0 #000000));
BoxShadow (3shadows)@include box-shadow(0, 2px, 5px, 0, #000000, false,(-15px 2px 5px 0 #000000, -15px 20px 5px 0 #000000));

Opacity:

Mixin CategotyExample Include
Opacity@include Opacity(0.5);

Linear Gradients:

Mixin CategotyExample Include
Linear Gradients vertical@include gradient-vertical(#cccccc, #666666, 0%, 100%)
Linear Gradients horizontal@include gradient-horizontal(#cccccc, #666666, 0%, 100%)

Rotate:

Mixin CategotyExample Include
Rotate@include rotate(45deg);

Retina background:

Mixin CategotyExample Include
Retina background@include background-retina(logo-@2.png", 120, 30);

Border Radius:

Mixin CategotyExample Include
Border Radius@include border-radius(6);

Transition:

Mixin CategotyExample Include
Transition@include transition(box-shadow ease-in 1s);
Transition property@include transition-property(width);
Transition function@include transition-timing-function(ease-in);
Transition delay@include transition-delay(2s);

Input placeholder:

Mixin CategotyExample Include
Input placeholder@input-placeholder(Your name);

Responsive breakpoints

Breakpoints are set by default but you can change value of variables. Value are set for bootstrap by default.

$screen-xs-max: 768px;
$screen-sm-max: 992px;
$screen-md-max: 1200px;

Example for maximum bootstrap col col-md you can use => {xs,sm,md}:

@include max-col(md) {
    ...
}

or up to col-md {xs,sm,md}:

@include min-col(md) {
    ...
}

if you want to add styles only for col-md {xs, sm, md}. Only for "col-md":

@include just-col(md) {
    ...
}
1.1.1

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago