🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@mozaic-ds/postcss-media-queries-packer-on-demand

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mozaic-ds/postcss-media-queries-packer-on-demand

PostCSS plugin that group media queries on demand.

latest
Source
npmnpm
Version
1.76.1
Version published
Maintainers
3
Created
Source

PostCSS Media Queries Packer On Demand

Adeo Design System (Badge)

PostCSS Media Queries Packer On Demand is a PostCSS plugin built for Adeo's Design System needs that allows to group CSS media queries on demand.

🎨 Getting started

ADEO Design System is a global and collaborative design system that facilitates the designer and developer experience, enabling them to create universal interfaces perfectly aligned with the business strategy of Adeo.

Learn more about the vision and guidelines by visiting the main documentation website.

📦 Install

To install the postcss-media-queries-packer-on-demand in your project, you will need to run the following command using npm:

npm install --save-dev @mozaic-ds/postcss-media-queries-packer-on-demand

If you prefer Yarn, use the following command instead:

yarn add -D @mozaic-ds/postcss-media-queries-packer-on-demand

📝 Usage

The postcss-media-queries-packer-on-demand plugin is used in the same way as all PostCSS plugins.

Simply import it into your postcss.config.js configuration file at the root of your project, and then add it to the plugins key in your PostCSS configuration object.

// postcss.config.js

module.exports = {
  plugins: [
+   require('postcss-media-queries-packer-on-demand'),
  ]
}

Next, choose a file in your CSS code base where you want to group media queries.

Once you've determined this location, you can indicate it to the plugin by wrapping the relevant media queries in the comments /* mqp:start */ and /* mqp:end */.

Example:

Your CSS file at the start:

/* mqp:start */
.foo {
  ...;
}
@media (min-width: 320px) {
  .foo {
    ...;
  }
}
.bar {
  ...;
}
@media (min-width: 680px) {
  .bar {
    ...;
  }
}
@media (min-width: 320px) {
  .bar {
    ...;
  }
}
@media (min-width: 1024px) {
  .bar {
    ...;
  }
}
/* mqp:end */

Your CSS file at output:

.foo {
  ...;
}
.bar {
  ...;
}
@media (min-width: 320px) {
  .foo {
    ...;
  }
  .bar {
    ...;
  }
}
@media (min-width: 680px) {
  .bar {
    ...;
  }
}
@media (min-width: 1024px) {
  .bar {
    ...;
  }
}

📰 Changelog

Releases are managed with GitHub Releases, including the changelog for each one.
Access to the Changelog to find out about the detailed changes to each release.

📣 Stay in touch

🐞 Bugs and feature requests

Have a bug or a feature request?
Please open an issue and use the template associated with your request.

🧑‍💻 Contributors

Owners

ADEO Design System Team

Author

Maintainers

📄 Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

Keywords

Adeo

FAQs

Package last updated on 06 Feb 2025

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