Sha256: ff4147c57a95c3a58dc2a80b3b1a649f4a9b3be84f8304616c1046a42dd0af0e
Contents?: true
Size: 1.71 KB
Versions: 23
Compression:
Stored size: 1.71 KB
Contents
# function-url-scheme-whitelist Specify a whitelist of allowed URL schemes. <!-- prettier-ignore --> ```css a { background-image: url('http://www.example.com/file.jpg'); } /** ↑ * This URL scheme */ ``` A [URL scheme](https://url.spec.whatwg.org/#syntax-url-scheme) consists of alphanumeric, `+`, `-`, and `.` characters. It can appear at the start of a URL and is followed by `:`. This rule ignores: - URL arguments without an existing URL scheme - URL arguments with variables or variable interpolation (`$sass`, `@less`, `--custom-property`, `#{$var}`, `@{var}`, `$(var)`) ## Options `array|string|regex`: `["array", "of", /schemes/ or "/regex/"]|"scheme"|/regex/` Given: ``` ["data", "/^http/"] ``` The following patterns are considered violations: <!-- prettier-ignore --> ```css a { background-image: url('file://file.jpg'); } ``` The following patterns are _not_ considered violations: <!-- prettier-ignore --> ```css a { background-image: url('example.com/file.jpg'); } ``` <!-- prettier-ignore --> ```css a { background-image: url('/example.com/file.jpg'); } ``` <!-- prettier-ignore --> ```css a { background-image: url('//example.com/file.jpg'); } ``` <!-- prettier-ignore --> ```css a { background-image: url('./path/to/file.jpg'); } ``` <!-- prettier-ignore --> ```css a { background-image: url('http://www.example.com/file.jpg'); } ``` <!-- prettier-ignore --> ```css a { background-image: url('https://www.example.com/file.jpg'); } ``` <!-- prettier-ignore --> ```css a { background-image: url('HTTPS://www.example.com/file.jpg'); } ``` <!-- prettier-ignore --> ```css a { background-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs='); } ```
Version data entries
23 entries across 23 versions & 1 rubygems