@csstools/postcss-media-queries-aspect-ratio-number-values
Use number values in aspect-ratio media queries.
Last updated 2 years ago by alaguna .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install @csstools/postcss-media-queries-aspect-ratio-number-values 
SYNC missed versions from official npm registry.

PostCSS Media Queries Aspect-Ratio Number Values PostCSS Logo

npm version CSS Standard Status Build Status Discord

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) {}

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |