Skip to content

iwbc/sass-utils

Repository files navigation

sass-utils

Installation

yarn add @iwbc/sass-utils

Usage

Create a wrapper SCSS file and initialize variables.

@forward @iwbc/sass-utils/scss/breakpoint with (
  $breakpoints: ('sp': 0, 'tab': 768px, 'pc': 1200px) !default
);

Import and use in any SCSS file.

@use breakpoint.scss;

.element {
  @include breakpoint.max('tab') {
    width: 50%;
  }
}

.mediatype {
  @include breakpoint.max('tab', 'screen, print') {
    color: #f00;
  }
}

Please refer to the documentation for other usage methods.