2.0.1 • Published 3 years ago

@dreipol/scss-mq v2.0.1

Weekly downloads
684
License
MIT
Repository
github
Last release
3 years ago

scss-mq

Dreipol scss media queries helper

Build Status NPM version NPM downloads MIT License

Documentation

Usage

Installation

npm i @dreipol/scss-mq -S

Import

You can import the mq mixin in your sass files simply using the @use rule for example:

@use 'node_modules/@dreipol/scss-mq' as *;

a {
    @include mq('xs') {
        color: red;
    }
} 

Notice that you can override the internal module variables using the with rule for example:

@use 'node_modules/@dreipol/scss-mq' as * with (
    $breakpoints: (xs: 600px, sm: 767px, md: 991px, lg: 1279px, xl: 1599px)
);

a {
    @include mq('xs') {
        color: red;
    }
} 

IMPORTANT You should override the internal scss-mq variables only once and at beginning of your main.scss file.`For example

In main.scss

@use 'node_modules/@dreipol/scss-mq' as * with (
    $breakpoints: (xs: 600px, sm: 767px, md: 991px, lg: 1279px, xl: 1599px)
);
// Grid
@use 'path/to/grid';

// components
@use 'path/to/a/component-b';
@use 'path/to/a/component-b';

In grid.scss

// you don't need to override again the breakpoints here!
@use 'node_modules/@dreipol/scss-mq' as *;

.grid {
    @include mq('xs') {
        width: 100%;
    }
}
2.0.1

3 years ago

2.0.0

4 years ago

1.0.0

4 years ago

0.1.6

5 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago