mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05:00
Initial commit
This commit is contained in:
83
node_modules/stylelint/lib/rules/function-url-data-uris/README.md
generated
vendored
Normal file
83
node_modules/stylelint/lib/rules/function-url-data-uris/README.md
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
# function-url-data-uris
|
||||
|
||||
Require or disallow data URIs for urls.
|
||||
|
||||
```css
|
||||
a { background-image: url('data:image/gif;base64,R0lGODlh='); }
|
||||
/** ↑
|
||||
* This data URI */
|
||||
```
|
||||
|
||||
This rule ignores variables inside `url` function (`$sass`, `@less`, `--custom-property`).
|
||||
|
||||
## Options
|
||||
|
||||
`string`: `"always"|"never"`
|
||||
|
||||
### `"always"`
|
||||
|
||||
There *must always* be data URIs in url.
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```css
|
||||
a {
|
||||
background-image: url(image.gif)
|
||||
}
|
||||
```
|
||||
|
||||
```css
|
||||
@font-face {
|
||||
font-family: 'foo';
|
||||
src: url(foo.ttf);
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are *not* considered warnings:
|
||||
|
||||
```css
|
||||
a {
|
||||
background-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=')
|
||||
}
|
||||
```
|
||||
|
||||
```css
|
||||
@font-face {
|
||||
font-family: 'foo';
|
||||
src: url(data:font/ttf;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=);
|
||||
}
|
||||
```
|
||||
|
||||
### `"never"`
|
||||
|
||||
There *must never* be data URIs in url.
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```css
|
||||
a {
|
||||
background-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=')
|
||||
}
|
||||
```
|
||||
|
||||
```css
|
||||
@font-face {
|
||||
font-family: 'foo';
|
||||
src: url(data:font/ttf;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=);
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are *not* considered warnings:
|
||||
|
||||
```css
|
||||
a {
|
||||
background-image: url(image.gif)
|
||||
}
|
||||
```
|
||||
|
||||
```css
|
||||
@font-face {
|
||||
font-family: 'foo';
|
||||
src: url(foo.ttf);
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user