Skip to content

Add quotes according to the stylelint rule#27771

Merged
MartijnCuppens merged 2 commits intotwbs:v4-devfrom
ysds:patch-1
Dec 5, 2018
Merged

Add quotes according to the stylelint rule#27771
MartijnCuppens merged 2 commits intotwbs:v4-devfrom
ysds:patch-1

Conversation

@ysds
Copy link
Copy Markdown
Contributor

@ysds ysds commented Dec 5, 2018

Noto Sans is expected to be considered a violation by the "font-family-name-quotes": "always-where-recommended" rule, but it does not seem to work for SCSS variables.

@ysds ysds requested a review from a team as a code owner December 5, 2018 08:26
@XhmikosR
Copy link
Copy Markdown
Member

XhmikosR commented Dec 5, 2018

But it seems we got no failures.

Just FYI I remember this quotes issue in the past and IIRC the spec does allow a whitespace without quotes.

That being said I'm all for it for consistency, I'd just feel safer if Stylelint (SCSS) complained.

@ysds
Copy link
Copy Markdown
Contributor Author

ysds commented Dec 5, 2018

It never fails. If a font family is defined as an SCSS variable, lint does not work (regardless of whether correct or not). In other words, it is ignored.

The following CSS gets linted:

a { font-family: Noto Sans; }

But the following SCSS doesn't get linted.

$font: Noto Sans;
a { font-family: $font; }

@XhmikosR
Copy link
Copy Markdown
Member

XhmikosR commented Dec 5, 2018

@MartijnCuppens push the button if you agree.

@MartijnCuppens MartijnCuppens merged commit 850d99b into twbs:v4-dev Dec 5, 2018
@mdo mdo mentioned this pull request Dec 5, 2018
@ysds ysds deleted the patch-1 branch January 7, 2019 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants