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

postcss-simplify-media-queries

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-simplify-media-queries

This plugin removes redundant parts of the media description

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

postcss-simplify-media-queries

PostCSS plugin for simplifying media queries by removing redundant parts of the media description. Installation

npm install postcss-simplify-media-queries --save-dev

Usage

Basic Usage

import postcss from 'postcss';
import simplifyMediaQueries from 'postcss-simplify-media-queries';

const css = `
@media (min-width: 200px) and (min-width: 400px) {
  /* styles here */
}
`;

postcss([simplifyMediaQueries])
  .process(css)
  .then((result) => {
    console.log(result.css);
  });

Example

Consider the following input:

@media (min-width: 200px) and (min-width: 400px) {
  /* styles here */
}

After applying the postcss-simplify-media-queries plugin, the output will be:

@media (min-width: 400px) {
  /* styles here */
}

Options

This plugin doens’t support any options at the moment

Test

To run the provided tests for this plugin, use the following command:

npm test

Contributing

Feel free to contribute to this project. Bug reports, feature requests, and pull requests are welcome. Please follow the contribution guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Package last updated on 23 Jan 2024

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