Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example documentation of qualified attribute selectors is wrong. #756

Open
Zuppo opened this issue Aug 13, 2019 · 1 comment
Open

Example documentation of qualified attribute selectors is wrong. #756

Zuppo opened this issue Aug 13, 2019 · 1 comment

Comments

@Zuppo
Copy link

Zuppo commented Aug 13, 2019

https://github.com/CSSLint/csslint/wiki/Disallow-unqualified-attribute-selectors

The following patterns are considered okay and do not cause warnings:

/* unqualified attribute selector is not key */
.selected [type=text] a {
    color: red;
}

Should read

The following patterns are considered okay and do not cause warnings:

/* unqualified attribute selector is not key */
a.selected [type=text] {
    color: red;
}

I would update this, but could not save edits on the page.

@frvge
Copy link
Contributor

frvge commented Nov 17, 2019

@Zuppo , you probably think that the selected class applies to an a. However, the rule seems to be about the right-most part of the CSS selectors.

In the current example, the a is on the right side, aka the "key" in this text, so then the unqualified attribute selector (implicitly a universal selector) rule doesn't apply.

Based on this, I think the current example is correct. CSS selectors go from right to left.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants