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

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

Package Overview
Dependencies
Maintainers
3
Versions
21
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.

  • 2.0.4
  • Source
  • npm
  • Socket score

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

PostCSS Media Queries Aspect-Ratio Number Values PostCSS Logo

npm version CSS Standard Status Build Status Discord

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 15 Dec 2023

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