blob: f0f23973ced76383c674908126d993de4b0c9be2 [file] [log] [blame] [view]
Nikolay Vitkov924fc2c2025-01-03 09:24:381# css-functions-list
2
3[![Build Status][ci-img]][ci]
4
5List of standard and
6[browser specific](<(https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix)>)
7CSS functions.
8
9Data sources are:
10
11- MDN reference on
12 [CSS functions](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions)
13- MDN reference on
14 [general CSS features](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference).
15- MDN
16 [browser compatibility data for CSS functions](https://github.com/mdn/browser-compat-data/tree/main/css/types)
17- Manually maintained experimental, legacy and removed functions
18
19## Install
20
21```sh
22npm install css-functions-list --save
23```
24
25## Usage
26
27```js
28import { promises as fs } from 'fs';
29import functionsListPath from 'css-functions-list';
30
31(async () => {
32 const functionsList = JSON.parse(
33 await fs.readFile(functionsListPath, 'utf8')
34 );
35 console.log(functionsList);
36 /* [
37 'abs',
38 'acos',
39 'annotation',
40 'asin',
41 'atan',
42 'atan2',
43 'attr',
44 'blur',
45 'brightness',
46 'calc'
47 // …
48 ]; */
49})();
50```
51
52## API
53
54### functionsListPath
55
56Type: `string`
57
58Path to CSS functions list JSON file.
59
60## License
61
62MIT © [Ivan Nikolić](http://ivannikolic.com)
63
64<!-- prettier-ignore-start -->
65
66[ci]: https://github.com/niksy/css-functions-list/actions?query=workflow%3ACI
67[ci-img]: https://github.com/niksy/css-functions-list/workflows/CI/badge.svg?branch=master
68
69<!-- prettier-ignore-end -->