All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.css.checks.l10n.common.single-quotes.html Maven / Gradle / Ivy

There is a newer version: 4.13
Show newest version

Strings should always be wrapped with single quotes ('); single being easier to type than double on qwerty keyboards.

Noncompliant Code Example

.mybox {
  background-image: url("img.png"); /* Noncompliant */
}

Compliant Solution

.mybox {
  background-image: url('img.png');
}

Exceptions

If a string contains one or several single quotes, double quotes (") wrapping can be used instead in order to avoid escaping characters within the string. Thus, in this case, no issue is raised.

.mybox {
  background-image: url("im'a'ge.png");
}

The encoding value of the @charset rule must be a double-quoted string per the W3C specifications. Thus, in this case, no issue is raised.

@charset "UTF-8";

See

stylelint Related Rules





© 2015 - 2024 Weber Informatics LLC | Privacy Policy