Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@littlemissrobot/sass-breakpoints
Advanced tools
Little Miss Robot breakpoints setup for defining breakpoints and applying media queries.
This package contains logic and functionality to define and insert breakpoint based media queries through the use of a configuration.
This package does not contain or generate any CSS. It simply provides a system
with @function
and @mixin
statement to manage breakpoints. It is part of the
@littlemissrobot/sass-system package.
Make use of Dart Sass:
This library makes use of Dart Sass, which is the primary implementation of Sass. Make sure that your Sass compiler is making use of Dart Sass.
Generate only what you need:
This library generates classes based on your configuration. The larger the configuration, the more css, the larger the CSS file. DO NOT enable all the config options, but only the ones you actually use and need!
# As a dependency
$ npm install @littlemissrobot/sass-breakpoints
# As a dev-dependency
$ npm install --save-dev @littlemissrobot/sass-breakpoints
@use "YOUR-PATH-TO-NODE_MODULES/@littlemissrobot/sass-breakpoints" as _breakpoints;
// Library
@use "YOUR-PATH-TO-NODE_MODULES/@littlemissrobot/sass-breakpoints" as _breakpoints with (
$viewports: (
vp-3: 360px,
vp-4: 480px,
vp-7: 720px,
vp-9: 992px,
vp-12: 1200px
)
);
_breakpoints
.@use "YOUR-PATH-TO-NODE_MODULES/@littlemissrobot/sass-breakpoints" as _breakpoints with (
$viewports: (
vp-3: 360px,
vp-4: 480px,
vp-7: 720px,
vp-9: 992px,
vp-12: 1200px
)
);
$viewports: (
vp-3: 360px,
vp-4: 480px,
vp-7: 720px,
vp-9: 992px,
vp-12: 1200px,
);
The $viewports
is a sass map where every key is the name of the viewport name
and the value is its width when it should get triggered.
Apply a breakpoint, to every element and prop above the given minimum width of the breakpoint.
Parameters:
@use "@littlemissrobot/sass-breakpoints" as _breakpoints with (
$viewports: (
vp-7: 720px
)
);
body {
// Name of the breakpoint
@include _breakpoints.at("vp-7") {
background-color: blue;
}
}
// Name of the breakpoint
@include _breakpoints.at("vp-7") {
body {
background-color: blue;
}
}
Apply a breakpoint, to every element and prop below the given maximum width of the breakpoint.
Parameters:
@use "@littlemissrobot/sass-breakpoints" as _breakpoints with (
$viewports: (
vp-7: 720px
)
);
body {
// Name of the breakpoint
@include _breakpoints.to("vp-7") {
background-color: blue;
}
}
// Name of the breakpoint
@include _breakpoints.to("vp-7") {
body {
background-color: blue;
}
}
Apply a breakpoint, to every element and prop between the given minimum and maximum width of the breakpoint.
Parameters:
$key1 (string): the minimum width, when below this width, the styling is not applied. The past value must be a string, representing the key of a breakpoint within the $viewports variable.
$key2 (string): the maximum width, when above this width, the styling is not applied. The past value must be a string, representing the key of a breakpoint within the $viewports variable.
@use "@littlemissrobot/sass-breakpoints" as _breakpoints with (
$viewports: (
vp-7: 720px,
vp-9: 992px
)
);
body {
// Name of the breakpoint
@include _breakpoints.between("vp-7", "vp-9") {
background-color: blue;
}
}
// Name of the breakpoint
@include _breakpoints.between("vp-7", "vp-9") {
body {
background-color: blue;
}
}
FAQs
Little Miss Robot breakpoints setup for defining breakpoints and applying media queries.
The npm package @littlemissrobot/sass-breakpoints receives a total of 34 weekly downloads. As such, @littlemissrobot/sass-breakpoints popularity was classified as not popular.
We found that @littlemissrobot/sass-breakpoints demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.