
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
css-mqpacker-starter
Advanced tools
Mixin starter for css-mqpacker with bootstrap breakpoints. Scss mixin for right order of queries
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
You must use the package with scss and postcss. You will find the webpack rule for compiling scss files with css-mqpacker below or use webpack starter.
Installation
Breakpoints
Init order
Mixins
Source mixin code
Possible order error
Webpack rule for compiling
Install the package
npm i css-mqpacker-starter
Import in main scss file
@import "~css-mqpacker-starter";
@include initMediaPosition();
Now use it :)
@include sm {
body {
font-size: 15px;
}
}
The package provide default breakpoints:
Breakpoint | Pixels |
---|---|
$xl | 1200px |
$lg | 992px |
$md | 768px |
$sm | 576px |
$xs | 420px |
$xxs | 360px |
There are media queries mixins for each breakpoint. Desktop First and Mobile First.
@include xl {
}
@include xl-up {
}
down | up |
---|---|
xl | xl-up |
lg | lg-up |
md | md-up |
sm | sm-up |
xs | xs-up |
xxs | xxs-up |
Put the mixin before custom scss code. It will create placeholder styles for body tag. It's important for css-mqpacker; There can be wrong order media queries without the mixin.
@include initMediaPosition();
Possible error see below
@mixin xl {
@media only screen and (max-width: $xl - 1) {
@content;
}
}
@mixin xl-up {
@media only screen and (min-width: $xl) {
@content;
}
}
In the case:
.card {
// styles
@include sm {
// styles 2
}
}
.container {
max-width: 1200px;
@include md {
max-width: 500px;
}
@include sm {
max-width: none;
}
}
Output after css-mqpacker will be:
.card {
// styles
}
.container {
max-width: 1200px;
}
@media only screen and (min-width: $sm) {
.card {
// styles 2
}
.container {
max-width: none;
}
}
@media only screen and (min-width: $md) {
.container {
max-width: 500px;
}
}
On screen $sm and below style .container{ max-width: none; }
will not be applied.
Use @include initMediaPosition()
to prevent this error.
Here is example: Webpack starter
// rules:
[
{
test: /\.scss$/,
use: [
isDev ? "style-loader" : MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: { sourceMap: true },
},
{
loader: "postcss-loader",
options: {
sourceMap: true,
config: { path: "postcss.config.js" },
},
},
{
loader: "sass-loader",
options: { sourceMap: true },
},
],
},
];
FAQs
Mixin starter for css-mqpacker with bootstrap breakpoints. Scss mixin for right order of queries
The npm package css-mqpacker-starter receives a total of 1 weekly downloads. As such, css-mqpacker-starter popularity was classified as not popular.
We found that css-mqpacker-starter 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.