mirror of
https://github.com/thangisme/notes.git
synced 2026-08-05 15:40:37 -04:00
Initial commit
This commit is contained in:
+85
@@ -0,0 +1,85 @@
|
||||
# selector-attribute-quotes
|
||||
|
||||
Require or disallow quotes for attribute values.
|
||||
|
||||
```css
|
||||
[target="_blank"] {}
|
||||
/** ↑ ↑
|
||||
* These quotes */
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
`string`: `"always"|"never"`
|
||||
|
||||
### `"always"`
|
||||
|
||||
Attribute values *must always* be quoted.
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```css
|
||||
[title=flower] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[class^=top] {}
|
||||
```
|
||||
|
||||
The following patterns are *not* considered warnings:
|
||||
|
||||
```css
|
||||
[title] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[target="_blank"] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[class|="top"] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[title~='text'] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[data-attribute='component'] {}
|
||||
```
|
||||
|
||||
### `"never"`
|
||||
|
||||
Attribute values *must never* be quoted.
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```css
|
||||
[target="_blank"] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[class|="top"] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[title~='text'] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[data-attribute='component'] {}
|
||||
```
|
||||
|
||||
The following patterns are *not* considered warnings:
|
||||
|
||||
```css
|
||||
[title] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[title=flower] {}
|
||||
```
|
||||
|
||||
```css
|
||||
[class^=top] {}
|
||||
```
|
||||
Reference in New Issue
Block a user