Skip to content

import-notation

Reports an @import written in the notation the url option does not ask for: by default a string, so url(...) is reported; with url: true, url(...), so a string is reported.

One notation for imports keeps the file uniform and easy to search. The string form is shorter; the url() form is the one that the older tools and bundlers read.

Reported
@import url("a.css");
@import "b.css";
@import 'c.css' screen;
css:
lint:
rules:
import-notation:
level: warn # off (default), warn, error
options:
url: false
less:
lint:
rules:
import-notation:
level: warn # off (default), warn, error
options:
url: false
scss:
lint:
rules:
import-notation:
level: warn # off (default), warn, error
options:
url: false
Option Type Default Description
url bool false Ask for url() instead of a string.

Enabled by the presets: css/stylelint-standard.

Suppress one line with sudsy-disable-next-line import-notation in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
stylelint import-notation full