HEX
Server: Apache/2.4.18 (Ubuntu)
System: Linux ubuntu 7.0.5-x86_64-linode173 #1 SMP PREEMPT_DYNAMIC Fri May 8 10:12:05 EDT 2026 x86_64
User: root (0)
PHP: 7.2.28-1+ubuntu16.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //opt/code/node_modules/cssnano/node_modules/postcss-calc/package.json
{
  "name": "postcss-calc",
  "version": "5.3.1",
  "description": "PostCSS plugin to reduce calc()",
  "keywords": [
    "css",
    "postcss",
    "postcss-plugin",
    "calculation",
    "calc"
  ],
  "author": {
    "name": "Maxime Thirouin"
  },
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "https://github.com/postcss/postcss-calc.git"
  },
  "files": [
    "index.js"
  ],
  "dependencies": {
    "postcss-message-helpers": "^2.0.0",
    "reduce-css-calc": "^1.2.6",
    "postcss": "^5.0.2"
  },
  "devDependencies": {
    "eslint": "^1.0.0",
    "npmpub": "^3.1.0",
    "postcss-custom-properties": "^5.0.0",
    "tape": "^3.0.0"
  },
  "scripts": {
    "test": "eslint . && tape test",
    "release": "npmpub"
  },
  "readme": "# postcss-calc [![Build Status](https://travis-ci.org/postcss/postcss-calc.png)](https://travis-ci.org/postcss/postcss-calc)\n\n> [PostCSS](https://github.com/postcss/postcss) plugin to reduce `calc()`.\n\nThis plugin reduce `calc()` references whenever it's possible.\nThis can be particularly useful with the [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) plugin.\n\n**Note:** When multiple units are mixed together in the same expression, the `calc()` statement is left as is, to fallback to the [w3c calc() feature](http://www.w3.org/TR/css3-values/#calc).\n\n## Installation\n\n```console\n$ npm install postcss-calc\n```\n\n## Usage\n\n```js\n// dependencies\nvar fs = require(\"fs\")\nvar postcss = require(\"postcss\")\nvar calc = require(\"postcss-calc\")\n\n// css to be processed\nvar css = fs.readFileSync(\"input.css\", \"utf8\")\n\n// process css\nvar output = postcss()\n  .use(calc())\n  .process(css)\n  .css\n```\n\n**Example** (with [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) enabled as well):\n\n```js\n// dependencies\nvar fs = require(\"fs\")\nvar postcss = require(\"postcss\")\nvar customProperties = require(\"postcss-custom-properties\")\nvar calc = require(\"postcss-calc\")\n\n// css to be processed\nvar css = fs.readFileSync(\"input.css\", \"utf8\")\n\n// process css\nvar output = postcss()\n  .use(customProperties())\n  .use(calc())\n  .process(css)\n  .css\n```\n\nUsing this `input.css`:\n\n```css\n:root {\n  --main-font-size: 16px;\n}\n\nbody {\n  font-size: var(--main-font-size);\n}\n\nh1 {\n  font-size: calc(var(--main-font-size) * 2);\n  height: calc(100px - 2em);\n  margin-bottom: calc(\n      var(--main-font-size)\n      * 1.5\n    )\n}\n```\n\nyou will get:\n\n```css\nbody {\n  font-size: 16px\n}\n\nh1 {\n  font-size: 32px;\n  height: calc(100px - 2em);\n  margin-bottom: 24px\n}\n```\n\nCheckout [tests](test) for more examples.\n\n### Options\n\n#### `precision` (default: `5`)\n\nAllow you to definine the precision for decimal numbers.\n\n```js\nvar out = postcss()\n  .use(calc({precision: 10}))\n  .process(css)\n  .css\n```\n\n#### `preserve` (default: `false`)\n\nAllow you to preserve calc() usage in output so browsers will handle decimal precision themselves.\n\n```js\nvar out = postcss()\n  .use(calc({preserve: true}))\n  .process(css)\n  .css\n```\n\n#### `warnWhenCannotResolve` (default: `false`)\n\nAdds warnings when calc() are not reduced to a single value.\n\n```js\nvar out = postcss()\n  .use(calc({warnWhenCannotResolve: true}))\n  .process(css)\n  .css\n```\n\n#### `mediaQueries` (default: `false`)\n\nAllows calc() usage as part of media query declarations.\n\n```js\nvar out = postcss()\n  .use(calc({mediaQueries: true}))\n  .process(css)\n  .css\n```\n\n#### `selectors` (default: `false`)\n\nAllows calc() usage as part of selectors.\n\n```js\nvar out = postcss()\n  .use(calc({selectors: true}))\n  .process(css)\n  .css\n```\n\nExample:\n\n```css\ndiv[data-size=\"calc(3*3)\"] {\n  width: 100px;\n}\n```\n\n---\n\n## Contributing\n\nWork on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.\n\n```console\n$ git clone https://github.com/postcss/postcss-calc.git\n$ git checkout -b patch-1\n$ npm install\n$ npm test\n```\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/postcss/postcss-calc/issues"
  },
  "_id": "postcss-calc@5.3.1",
  "dist": {
    "shasum": "4ae1049a3fc45ba05f517bc0c13dc7e95d5c6405"
  },
  "_from": "postcss-calc@^5.2.0",
  "_resolved": "http://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz"
}