source: frontend/node_modules/postcss-calc/package.json

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 4.4 KB
Line 
1{
2 "name": "postcss-calc",
3 "version": "8.2.4",
4 "description": "PostCSS plugin to reduce calc()",
5 "keywords": [
6 "css",
7 "postcss",
8 "postcss-plugin",
9 "calculation",
10 "calc"
11 ],
12 "main": "src/index.js",
13 "types": "types/index.d.ts",
14 "files": [
15 "src",
16 "types",
17 "LICENSE"
18 ],
19 "author": "Andy Jansson",
20 "license": "MIT",
21 "repository": "https://github.com/postcss/postcss-calc.git",
22 "eslintConfig": {
23 "extends": [
24 "eslint:recommended",
25 "prettier"
26 ],
27 "env": {
28 "node": true,
29 "es2017": true
30 },
31 "ignorePatterns": [
32 "src/parser.js"
33 ],
34 "rules": {
35 "curly": "error"
36 }
37 },
38 "devDependencies": {
39 "@types/node": "^17.0.15",
40 "eslint": "^8.8.0",
41 "eslint-config-prettier": "^8.3.0",
42 "jison-gho": "^0.6.1-216",
43 "postcss": "^8.2.2",
44 "prettier": "^2.5.1",
45 "typescript": "^4.5.5",
46 "uvu": "^0.5.3"
47 },
48 "dependencies": {
49 "postcss-selector-parser": "^6.0.9",
50 "postcss-value-parser": "^4.2.0"
51 },
52 "peerDependencies": {
53 "postcss": "^8.2.2"
54 },
55 "scripts": {
56 "build": "jison src/parser.jison -o src/parser.js",
57 "lint": "eslint src && tsc",
58 "pretest": "pnpm run build",
59 "test": "uvu src/__tests__"
60 },
61 "readme": "# PostCSS Calc [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n[![NPM Version][npm-img]][npm-url]\n[![Support Chat][git-img]][git-url]\n\n[PostCSS Calc] lets you reduce `calc()` references whenever it's possible.\nWhen multiple units are mixed together in the same expression, the `calc()`\nstatement is left as is, to fallback to the [W3C calc() implementation].\n\n## Installation\n\n```bash\nnpm 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\nUsing this `input.css`:\n\n```css\nh1 {\n font-size: calc(16px * 2);\n height: calc(100px - 2em);\n width: calc(2*var(--base-width));\n margin-bottom: calc(16px * 1.5);\n}\n```\n\nyou will get:\n\n```css\nh1 {\n font-size: 32px;\n height: calc(100px - 2em);\n width: calc(2*var(--base-width));\n margin-bottom: 24px\n}\n```\nCheckout [tests] for more examples.\n\n### Options\n\n#### `precision` (default: `5`)\n\nAllow you to define 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\nprecision 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## Related PostCSS plugins\nTo replace the value of CSS custom properties at build time, try [PostCSS Custom Properties].\n\n## Contributing\n\nWork on a branch, install dev-dependencies, respect coding style & run tests\nbefore submitting a bug fix or a feature.\n\n```bash\ngit clone git@github.com:postcss/postcss-calc.git\ngit checkout -b patch-1\nnpm install\nnpm test\n```\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[npm-img]: https://img.shields.io/npm/v/postcss-calc.svg\n[npm-url]: https://www.npmjs.com/package/postcss-calc\n\n[PostCSS]: https://github.com/postcss\n[PostCSS Calc]: https://github.com/postcss/postcss-calc\n[PostCSS Custom Properties]: https://github.com/postcss/postcss-custom-properties\n[tests]: src/__tests__/index.js\n[W3C calc() implementation]: https://www.w3.org/TR/css3-values/#calc-notation\n"
62}
Note: See TracBrowser for help on using the repository browser.