DEPRECATED: This package has been moved to this location, the current repo is no more maintained.
Generate CSS breakpoint.
npm install @sass-collective/sass-breakpoint --save
breakpoint($min-width, $max-width, $root-selector);
Names | Values | Descriptions |
---|---|---|
$strict |
true | Subtract 1px on max-width value, 960px come 959px |
$very-small |
320 | iPhone in portrait mode |
$small |
480 | iPhone in landscape mode |
$medium |
768 | iPad in portrait mode |
$large |
960 | Desktop |
$wide |
1200 | Wide screen |
@use "@sass-collective/sass-breakpoint" with (
$large: 960
);
@use "@sass-collective/sass-breakpoint";
// Mixin
body {
// Min width
@include sass-breakpoint.breakpoint(960) {
font-size: 10px;
}
// Max width
@include sass-breakpoint.breakpoint($max-width: 960) {
font-size: 10px;
}
// Between
@include sass-breakpoint.breakpoint(480, 960) {
font-size: 10px;
}
// Parent class or ID
@include sass-breakpoint.breakpoint(480, $root-selector: '.class') {
font-size: 10px;
}
}
@import "@sass-collective/sass-breakpoint";
// Mixin
body {
// Min width
@include sass-breakpoint(960) {
font-size: 10px;
}
// Max width
@include sass-breakpoint($max-width: 960) {
font-size: 10px;
}
// Between
@include sass-breakpoint(480, 960) {
font-size: 10px;
}
// Parent class or ID
@include sass-breakpoint(480, $root-selector: '.class') {
font-size: 10px;
}
}
/* Min width */
@media all and (min-width: 960px) {
body {
font-size: 10px;
}
}
/* Max width */
@media all and (max-width: 959px) {
body {
font-size: 10px;
}
}
/* Between */
@media all and (min-width: 480px) and (max-width: 959px) {
body {
font-size: 10px;
}
}
/* Parent class or ID */
@media all and (min-width: 480px) {
.class body {
font-size: 10px;
}
}