source: trip-planner-front/node_modules/postcss-pseudo-class-any-link/README.md@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[6a3a178]1# PostCSS Pseudo Class Any Link [<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[![Support Chat][git-img]][git-url]
7
8[PostCSS Pseudo Class Any Link] lets you `:any-link` pseudo-class in CSS,
9following the [Selectors] specification.
10
11```pcss
12nav :any-link > span {
13 background-color: yellow;
14}
15
16/* becomes */
17
18nav :link > span, nav :visited > span {
19 background-color: yellow;
20}
21
22nav :any-link > span {
23 background-color: yellow;
24}
25```
26
27From the [proposal][Selectors]:
28
29> The `:any-link` pseudo-class represents an element that acts as the source
30 anchor of a hyperlink. It matches an element if the element would match
31 `:link` or `:visited`.
32
33## Usage
34
35Add [PostCSS Pseudo Class Any Link] to your project:
36
37```bash
38npm install postcss-pseudo-class-any-link --save-dev
39```
40
41Use [PostCSS Pseudo Class Any Link] to process your CSS:
42
43```js
44const postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');
45
46postcssPseudoClassAnyLink.process(YOUR_CSS /*, processOptions, pluginOptions */);
47```
48
49Or use it as a [PostCSS] plugin:
50
51```js
52const postcss = require('postcss');
53const postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');
54
55postcss([
56 postcssPseudoClassAnyLink(/* pluginOptions */)
57]).process(YOUR_CSS /*, processOptions */);
58```
59
60[PostCSS Pseudo Class Any Link] runs in all Node environments, with special
61instructions for:
62
63| [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) |
64| --- | --- | --- | --- | --- | --- |
65
66## Options
67
68### preserve
69
70The `preserve` option determines whether the original `:any-link` rule is
71preserved. By default, it is preserved.
72
73```js
74postcssPseudoClassAnyLink({ preserve: false })
75```
76
77```pcss
78nav :any-link > span {
79 background-color: yellow;
80}
81
82/* becomes */
83
84nav :link > span, nav :visited > span {
85 background-color: yellow;
86}
87```
88
89[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-pseudo-class-any-link.svg
90[cli-url]: https://travis-ci.org/jonathantneal/postcss-pseudo-class-any-link
91[css-img]: https://cssdb.org/badge/any-link-pseudo-class.svg
92[css-url]: https://cssdb.org/#any-link-pseudo-class
93[git-img]: https://img.shields.io/badge/support-chat-blue.svg
94[git-url]: https://gitter.im/postcss/postcss
95[npm-img]: https://img.shields.io/npm/v/postcss-pseudo-class-any-link.svg
96[npm-url]: https://www.npmjs.com/package/postcss-pseudo-class-any-link
97
98[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
99[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
100[PostCSS]: https://github.com/postcss/postcss
101[PostCSS Loader]: https://github.com/postcss/postcss-loader
102[PostCSS Pseudo Class Any Link]: https://github.com/jonathantneal/postcss-pseudo-class-any-link
103[Selectors]: https://www.w3.org/TR/selectors-4/#the-any-link-pseudo
Note: See TracBrowser for help on using the repository browser.