Socket
Socket
Sign inDemoInstall

@csstools/postcss-media-queries-aspect-ratio-number-values

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

@csstools/postcss-media-queries-aspect-ratio-number-values

Use number values in aspect-ratio media queries.


Version published
Weekly downloads
1.1M
increased by2.52%
Maintainers
3
Weekly downloads
 
Created
Source

PostCSS Media Queries Aspect-Ratio Number Values PostCSS Logo

npm version Build Status Discord

Baseline Status CSS Standard Status

npm install @csstools/postcss-media-queries-aspect-ratio-number-values --save-dev

PostCSS Media Queries Aspect-Ratio Number Values lets you use non-integer numbers and calc() in aspect-ratio feature queries following the Media Queries 4 Specification.

@media (min-aspect-ratio: 1.77) {}

/* becomes */

@media (min-aspect-ratio: 177/100) {}

Usage

Add PostCSS Media Queries Aspect-Ratio Number Values to your project:

npm install postcss @csstools/postcss-media-queries-aspect-ratio-number-values --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssMediaQueriesAspectRatioNumberValues = require('@csstools/postcss-media-queries-aspect-ratio-number-values');

postcss([
	postcssMediaQueriesAspectRatioNumberValues(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Media Queries Aspect-Ratio Number Values runs in all Node environments, with special instructions for:

Options

preserve

The preserve option determines whether the original notation is preserved. By default, it is not preserved.

postcssMediaQueriesAspectRatioNumberValues({ preserve: true })
@media (min-aspect-ratio: 1.77) {}

/* becomes */

@media (min-aspect-ratio: 1.77),(min-aspect-ratio: 177/100) {}

Keywords

FAQs

Package last updated on 04 May 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