1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 02:07:20 -04:00
notes/node_modules/stylelint/lib/rules/selector-pseudo-element-colon-notation
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
index.js Initial commit 2017-03-09 13:16:08 -05:00
README.md Initial commit 2017-03-09 13:16:08 -05:00

selector-pseudo-element-colon-notation

Specify single or double colon notation for applicable pseudo-elements.

   a::before { color:pink; }
/** ↑
 * This notation */

The :: notation was chosen for pseudo-elements to establish a discrimination between pseudo-classes (which subclass existing elements) and pseudo-elements (which are elements not represented in the document tree).

However, for compatibility with existing style sheets, user agents also accept the previous one-colon notation for pseudo-elements introduced in CSS levels 1 and 2 (namely, :first-line, :first-letter, :before and :after).

Options

string: "single"|"double"

"single"

Applicable pseudo-elements must always use the single colon notation.

The following patterns are considered warnings:

a::before { color: pink; }
a::after { color: pink; }
a::first-letter { color: pink; }
a::first-line { color: pink; }

The following patterns are not considered warnings:

a:before { color: pink; }
a:after { color: pink; }
a:first-letter { color: pink; }
a:first-line { color: pink; }
input::placeholder { color: pink; }
li::marker { font-variant-numeric: tabular-nums; }

"double"

Applicable pseudo-elements must always use the double colon notation.

The following patterns are considered warnings:

a:before { color: pink; }
a:after { color: pink; }
a:first-letter { color: pink; }
a:first-line { color: pink; }

The following patterns are not considered warnings:

a::before { color: pink; }
a::after { color: pink; }
a::first-letter { color: pink; }
a::first-line { color: pink; }
input::placeholder { color: pink; }
li::marker { font-variant-numeric: tabular-nums; }