Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Plugin breaks when applied to a file containing a css property set #4

Closed
dantman opened this issue May 9, 2016 · 1 comment
Closed

Comments

@dantman
Copy link

dantman commented May 9, 2016

The @apply spec defines 'css property sets' like this:

.warning {
  --toolbar-title-theme: {
    color: red;
    font-weight: bold;
  };
}

These are currently in production use on sites using Polymer.

However when trying to process css with this plugin I get an error like:

Error: Expected pseudo-class or pseudo-element
    at new error ({app}/node_modules/postcss-selector-parser/dist/processor.js:27:23)
    at Parser.error ({app}/node_modules/postcss-selector-parser/dist/parser.js:212:15)
    at Parser.pseudo ({app}/node_modules/postcss-selector-parser/dist/parser.js:292:25)
    at Parser.parse ({app}/node_modules/postcss-selector-parser/dist/parser.js:502:22)
    at Parser.loop ({app}/node_modules/postcss-selector-parser/dist/parser.js:470:18)
    at new Parser ({app}/node_modules/postcss-selector-parser/dist/parser.js:89:21)
    at Processor.process ({app}/node_modules/postcss-selector-parser/dist/processor.js:24:21)
    at {app}/node_modules/postcss-pseudo-class-any-link/index.js:48:7
    at {app}/node_modules/postcss/lib/container.js:118:28
    at {app}/node_modules/postcss/lib/container.js:81:26
    at Rule.each ({app}/node_modules/postcss/lib/container.js:68:22)
    at Rule.walk ({app}/node_modules/postcss/lib/container.js:80:21)
    at {app}/node_modules/postcss/lib/container.js:83:32
    at Root.each ({app}/node_modules/postcss/lib/container.js:68:22)
    at Root.walk ({app}/node_modules/postcss/lib/container.js:80:21)
    at Root.walkRules ({app}/node_modules/postcss/lib/container.js:116:25)

This bug is exclusive to any-link. I have postcss-selector-matches, postcss-selector-not, and postcss-nesting all present and none of them have an issue with the syntax.

@texastoland
Copy link
Contributor

texastoland commented Jun 29, 2016

This is coming from the new postcss/postcss-selector-parser#28 dependency.

jonathantneal pushed a commit that referenced this issue Jun 29, 2016
* Add failing test

* Pass test

Fix #4. See postcss/postcss-selector-parser#28.
romainmenke pushed a commit to csstools/postcss-plugins that referenced this issue Nov 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants