Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-sort-media-queries

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-sort-media-queries

PostCSS plugin for combine and sort CSS media queries with mobile first or desktop first methods.

  • 2.3.15
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is postcss-sort-media-queries?

The postcss-sort-media-queries package is a PostCSS plugin that sorts CSS media queries. It helps in organizing media queries in a specific order, which can be useful for maintaining a clean and efficient stylesheet.

What are postcss-sort-media-queries's main functionalities?

Sort Media Queries by Width

This feature sorts media queries in a mobile-first order, meaning smaller screen sizes will be prioritized over larger ones.

module.exports = {
  plugins: [
    require('postcss-sort-media-queries')({
      sort: 'mobile-first'
    })
  ]
};

Sort Media Queries by Custom Order

This feature sorts media queries in a desktop-first order, meaning larger screen sizes will be prioritized over smaller ones.

module.exports = {
  plugins: [
    require('postcss-sort-media-queries')({
      sort: 'desktop-first'
    })
  ]
};

Sort Media Queries by Specific Criteria

This feature allows you to sort media queries based on a custom function, providing flexibility in how media queries are ordered.

module.exports = {
  plugins: [
    require('postcss-sort-media-queries')({
      sort: function(a, b) {
        return a.localeCompare(b);
      }
    })
  ]
};

Other packages similar to postcss-sort-media-queries

Keywords

FAQs

Package last updated on 09 Dec 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc