source: frontend/node_modules/postcss-overflow-shorthand/README.md

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

Fix frontend appearance

  • Property mode set to 100644
File size: 2.6 KB
Line 
1# PostCSS Overflow Shorthand [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
2
3[![NPM Version][npm-img]][npm-url]
4[![CSS Standard Status][css-img]][css-url]
5[![Build Status][cli-img]][cli-url]
6[<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]
7
8[PostCSS Overflow Shorthand] lets you use the `overflow` shorthand in CSS,
9following the [CSS Overflow] specification.
10
11[!['Can I use' table](https://caniuse.bitsofco.de/image/css-overflow.png)](https://caniuse.com/#feat=css-overflow)
12
13```pcss
14html {
15 overflow: hidden auto;
16}
17
18/* becomes */
19
20html {
21 overflow-x: hidden;
22 overflow-y: auto;
23 overflow: hidden auto;
24}
25```
26
27## Usage
28
29Add [PostCSS Overflow Shorthand] to your project:
30
31```bash
32npm install postcss postcss-overflow-shorthand --save-dev
33```
34
35Use it as a [PostCSS] plugin:
36
37```js
38const postcss = require('postcss');
39const postcssOverflowShorthand = require('postcss-overflow-shorthand');
40
41postcss([
42 postcssOverflowShorthand(/* pluginOptions */)
43]).process(YOUR_CSS /*, processOptions */);
44```
45
46[PostCSS Overflow Shorthand] runs in all Node environments, with special
47instructions for:
48
49| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
50| --- | --- | --- | --- | --- | --- |
51
52## Options
53
54### preserve
55
56The `preserve` option determines whether the original `overflow` declaration is
57preserved. By default, it is preserved.
58
59```js
60postcssOverflowShorthand({ preserve: false })
61```
62
63```pcss
64html {
65 overflow: hidden auto;
66}
67
68/* becomes */
69
70html {
71 overflow-x: hidden;
72 overflow-y: auto;
73}
74```
75
76[cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
77[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
78[css-img]: https://cssdb.org/images/badges/overflow-property.svg
79[css-url]: https://cssdb.org/#overflow-property
80[discord]: https://discord.gg/bUadyRwkJS
81[npm-img]: https://img.shields.io/npm/v/postcss-overflow-shorthand.svg
82[npm-url]: https://www.npmjs.com/package/postcss-overflow-shorthand
83
84[CSS Overflow]: https://drafts.csswg.org/css-overflow/#propdef-overflow
85[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
86[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
87[PostCSS]: https://github.com/postcss/postcss
88[PostCSS Loader]: https://github.com/postcss/postcss-loader
89[PostCSS Overflow Shorthand]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-overflow-shorthand
Note: See TracBrowser for help on using the repository browser.