Skip to content

Commit 6c84259

Browse files
committedDec 9, 2016
docs(readme): update at standard
1 parent 31e0ea0 commit 6c84259

File tree

1 file changed

+56
-30
lines changed

1 file changed

+56
-30
lines changed
 

‎readme.md

+56-30
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
1-
# postcss-attribute-selector-prefix plugin for postcss
2-
> Adds a namespace/prefix to attribute selector, needs to escape from the third-party frameworks.
1+
# postcss-attribute-selector-prefix <a href="https://github.com/postcss/postcss"><img align="left" height="49" title="PostCSS" src="http://postcss.github.io/postcss/logo.svg"></a>
2+
> [PostCSS](https://github.com/postcss/postcss) plugin adds a namespace/prefix to attribute selector.
33
4+
[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo][![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix)
45

5-
[![Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix)[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)
6+
[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)
67

7-
```css
8-
/* input.css */
9-
.class,
10-
[type="text"],
11-
[class*="lorem"] {
12-
color:red;
13-
}
14-
```
15-
16-
```css
17-
/* Output example */
18-
.class,
19-
[type="text"],
20-
[class*="test-lorem"] {
21-
color:red;
22-
}
23-
```
8+
## Why ?
9+
Needs to escape from the third-party frameworks.
2410

25-
## Installation
11+
## Install
2612

27-
```console
28-
$ npm install postcss-attribute-selector-prefix
13+
```bash
14+
$ npm install postcss-at-rules-variables
2915
```
3016

17+
> **Note:** This project is compatible with node v4+
18+
3119
## Usage
3220

3321
```js
@@ -48,20 +36,40 @@ var output = postcss()
4836
console.log(output);
4937
```
5038

51-
### Options
39+
## Example
40+
41+
```css
42+
/* input.css */
43+
.class,
44+
[type="text"],
45+
[class*="lorem"] {
46+
color:red;
47+
}
48+
```
49+
50+
```css
51+
/* Output example */
52+
.class,
53+
[type="text"],
54+
[class*="test-lorem"] {
55+
color:red;
56+
}
57+
```
58+
59+
## Options
5260

5361
#### `prefix`
54-
*add prefix to attribute selector*
5562

5663
Type: `string`
57-
Default: ``
64+
Default: ``
65+
Description: *add prefix to attribute selector*
5866

5967
#### `filter`
60-
*attribute selector to which we must add the prefix*
6168

6269
Type: `Array`
6370
Default: `[]`
64-
Example: `['class', 'id']`
71+
Description: *attribute selector to which we must add the prefix*
72+
Example: `['class', 'id']`
6573

6674
```css
6775
/* input.css */
@@ -84,10 +92,11 @@ Example: `['class', 'id']`
8492
```
8593

8694
#### `ignore`
87-
*ignored attribute selector*
95+
8896

8997
Type: `Array`
9098
Default: `[]`
99+
Description: *ignored attribute selector*
91100
Example: `['type', 'alt']`
92101

93102
```css
@@ -110,4 +119,21 @@ Example: `['type', 'alt']`
110119
}
111120
```
112121

113-
See [PostCSS](https://github.com/postcss/postcss) docs for examples for your environment.
122+
## LICENSE
123+
124+
> MIT License (MIT)
125+
126+
>Copyright (c) Ivan Demidov <scrum@list.ru>
127+
128+
> Permission is hereby granted, free of charge, to any person obtaining a copy
129+
of this software and associated documentation files (the "Software"), to deal
130+
in the Software without restriction, including without limitation the rights
131+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
132+
copies of the Software, and to permit persons to whom the Software is
133+
furnished to do so, subject to the following conditions:
134+
135+
> The above copyright notice and this permission notice shall be included in all
136+
copies or substantial portions of the Software.
137+
138+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
139+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

0 commit comments

Comments
 (0)
Please sign in to comment.