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

Fixed: `selector-type-no-unknown` is now ignore `/deep/` shadow-piercing descendant combinator. #2508

Merged
merged 1 commit into from Apr 22, 2017

Conversation

3 participants
@evilebottnawi
Member

evilebottnawi commented Apr 18, 2017

Which issue, if any, is this issue related to?

#2506

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

Maybe need update docs or just add example to valid

@jeddy3

Tests look good.

I've made a request to use a util.

@@ -89,6 +89,7 @@ const rule = function (actual, options) {
|| svgTags.indexOf(tagNameLowerCase) !== -1
|| keywordSets.nonStandardHtmlTags.has(tagNameLowerCase)
|| mathMLTags.indexOf(tagNameLowerCase) !== -1
|| tagNameLowerCase === "/deep/"

This comment has been minimized.

@jeddy3

jeddy3 Apr 18, 2017

Member

Let's move this to the isStandardSyntaxTypeSelector util. It's where we build on top of postcss-selector-parser.

Also, let's return false for all reference combinators, not just /deep/ i.e. return false for anything that starts and ends with a /.

Be sure to comment the line e.g.

// Reference combinators like `/deep/`

This comment has been minimized.

@evilebottnawi

evilebottnawi Apr 18, 2017

Member

@jeddy3 good solution.

This comment has been minimized.

@evilebottnawi

evilebottnawi Apr 18, 2017

Member

@jeddy3 one remarks: remove tests on invalid /deeeps/ (i think it is not related to this rules).

@evilebottnawi evilebottnawi force-pushed the issue-2506-selector-type-no-unknown branch from 4a40256 to 30311a7 Apr 18, 2017

@evilebottnawi

This comment has been minimized.

Member

evilebottnawi commented Apr 18, 2017

/cc @jeddy3

@jeddy3

jeddy3 approved these changes Apr 18, 2017

LGTM

@davidtheclark

One question, otherwise seems fine to me.

description: "shadow-piercing descendant combinator",
}, {
code: ".foo /for/ .bar {}",
description: "reference combinators",

This comment has been minimized.

@davidtheclark

davidtheclark Apr 21, 2017

Contributor

What is a "reference combinator"?

This comment has been minimized.

@evilebottnawi

evilebottnawi Apr 21, 2017

Member

@davidtheclark but seem it is deprecated selector, i don't see infomation about this in other spec, btw some project use /deep/ and be good just ignore this

This comment has been minimized.

@davidtheclark

davidtheclark Apr 21, 2017

Contributor

👍

@davidtheclark davidtheclark merged commit 311e66e into master Apr 22, 2017

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 95.485%
Details

@davidtheclark davidtheclark deleted the issue-2506-selector-type-no-unknown branch Apr 22, 2017

@davidtheclark

This comment has been minimized.

Contributor

davidtheclark commented Apr 22, 2017

Added to changelog:

  • Fixed: selector-type-no-unknown now ignores the /deep/ shadow-piercing combinator (#2508).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment