Skip to content

function-url-quotes

Reports an unquoted url(...).

An unquoted url has to escape spaces, parentheses and quotes, and a file name that has one of these breaks the declaration. A quoted url can hold any character, so the habit of quoting never breaks.

To fix, wrap the argument in quotes.

Reported
...
transition: 0s;
width: calc(0px + 1px);
...
background: url(a.png), url("b.png");
...
css:
lint:
rules:
function-url-quotes: warn # off (default), warn, error
less:
lint:
rules:
function-url-quotes: warn # off (default), warn, error
scss:
lint:
rules:
function-url-quotes: warn # off (default), warn, error

Enabled by the presets: css/stylelint-standard.

Suppress one line with sudsy-disable-next-line function-url-quotes in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
stylelint function-url-quotes partial differs from stylelint on url() inside image-set()