source: frontend/node_modules/postcss-gap-properties/README.md

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: 2.4 KB
Line 
1# PostCSS Gap Properties [<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 Gap Properties] lets you use the `gap`, `column-gap`, and `row-gap`
9shorthand properties in CSS, following the [CSS Grid Layout] specification.
10
11```pcss
12.standard-grid {
13 gap: 20px;
14}
15
16.spaced-grid {
17 column-gap: 40px;
18 row-gap: 20px;
19}
20
21/* becomes */
22
23.standard-grid {
24 grid-gap: 20px;
25 gap: 20px;
26}
27
28.spaced-grid {
29 grid-column-gap: 40px;
30 column-gap: 40px;
31 grid-row-gap: 20px;
32 row-gap: 20px;
33}
34```
35
36## Usage
37
38Add [PostCSS Gap Properties] to your project:
39
40```bash
41npm install postcss postcss-gap-properties --save-dev
42```
43
44Use [PostCSS Gap Properties] as a [PostCSS] plugin:
45
46```js
47import postcss from 'postcss';
48import postcssGapProperties from 'postcss-gap-properties';
49
50postcss([
51 postcssGapProperties(/* pluginOptions */)
52]).process(YOUR_CSS /*, processOptions */);
53```
54
55[PostCSS Gap Properties] runs in all Node environments, with special instructions for:
56
57| [Node](INSTALL.md#node) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
58| --- | --- | --- | --- | --- |
59
60## Options
61
62### preserve
63
64The `preserve` option determines whether the original `gap` declaration should
65remain in the CSS. By default, the original declaration is preserved.
66
67[css-img]: https://cssdb.org/images/badges/gap-properties.svg
68[css-url]: https://cssdb.org/#gap-properties
69[cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
70[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
71[discord]: https://discord.gg/bUadyRwkJS
72[npm-img]: https://img.shields.io/npm/v/postcss-gap-properties.svg
73[npm-url]: https://www.npmjs.com/package/postcss-gap-properties
74
75[CSS Grid Layout]: https://www.w3.org/TR/css-grid-1/#gutters
76[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
77[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
78[PostCSS]: https://github.com/postcss/postcss
79[PostCSS Loader]: https://github.com/postcss/postcss-loader
80[PostCSS Gap Properties]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gap-properties
Note: See TracBrowser for help on using the repository browser.