Gathering detailed insights and metrics for jss-plugin-sort-css-media-queries
Gathering detailed insights and metrics for jss-plugin-sort-css-media-queries
Gathering detailed insights and metrics for jss-plugin-sort-css-media-queries
Gathering detailed insights and metrics for jss-plugin-sort-css-media-queries
JSS plugin for sort CSS media queries
npm install jss-plugin-sort-css-media-queries
Typescript
Module System
Node Version
NPM Version
TypeScript (67.97%)
JavaScript (32.03%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
BSD-3-Clause License
1 Stars
6 Commits
1 Watchers
2 Branches
1 Contributors
Updated on Feb 15, 2021
Latest Version
1.0.1-beta.0
Package Id
jss-plugin-sort-css-media-queries@1.0.1-beta.0
Unpacked Size
10.21 kB
Size
4.04 kB
File Count
6
NPM Version
7.0.15
Node Version
15.1.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
JSS plugin for sort CSS media queries
1npm i jss-plugin-sort-css-media-queries
desktopFirst
type: boolean
default: false
By default, plugin is using mobileFirst methodology for sorting CSS Media Queries.
By this option you can change behavior to the desktopFirst methodology.
combineMediaQueries
type: boolean
default: false
You can combine similar CSS Media Queries rules into the one block.
1import jss from 'jss'; 2jss.use(sortCssMediaQueries()); 3 4const sheet = jss.createStyleSheet({ 5 button: { 6 width: 100, 7 '@media (min-width: 600px)': { 8 width: 150 9 } 10 }, 11 span: { 12 color: 'blue', 13 '@media (min-width: 600px)': { 14 width: 'yellow' 15 } 16 } 17});
Result without combineMediaQueries
1button { 2 width: 100px; 3} 4 5span { 6 color: blue; 7} 8 9@media (min-width: 600px) { 10 button { 11 width: 150px; 12 } 13} 14 15@media (min-width: 600px) { 16 span { 17 color: yellow; 18 } 19}
Result with combineMediaQueries: true
1button { 2 width: 100px; 3} 4 5span { 6 color: blue; 7} 8 9@media (min-width: 600px) { 10 button { 11 width: 150px; 12 } 13 14 span { 15 color: yellow; 16 } 17}
Unfortunately, I have not found a more correct method of influencing the sorting of the list of rules than how to modify the
RuleList::toString()
method.
That is a wrong way from the architecture OOP principles, but it is the most non-breaking way for the whole JSS workflow.
After calling.toString()
method JSS work is done and in this point I can make own job with sorting, combining and returning CSS output.
Please fill free to create issues or send PR
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
27 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More