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

Cannot use with postcss-apply #28

Closed
matype opened this issue Jan 15, 2016 · 5 comments
Closed

Cannot use with postcss-apply #28

matype opened this issue Jan 15, 2016 · 5 comments

Comments

@matype
Copy link
Member

matype commented Jan 15, 2016

I start to use postcss-apply with cssnext (postcss-selector-parser is used in cssnext), but the following error is occured.

Error: Expected pseudo-class or pseudo-element

and here is my CSS code.

:root {
  --truncate: {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

I wish your help. Thanks.

@ben-eb
Copy link
Member

ben-eb commented Jan 15, 2016

I think it would be best to open an issue (or better, send a PR) on the affected plugin(s) that use postcss-selector-parser, see #27 for the original discussion behind this, and see https://github.com/ben-eb/postcss-minify-selectors/commit/26af0e2eff5363bc922821398145492d9fc2c8fb for a fix.

@ben-eb ben-eb closed this as completed Jan 15, 2016
@matype
Copy link
Member Author

matype commented Jan 15, 2016

👍

@texastoland
Copy link

texastoland commented Jun 29, 2016

I'm receiving the same error from postcss-pseudo-class-any-link using cssnext. I'm PRing there but @apply is now specified and implemented?

jonathantneal pushed a commit to csstools/postcss-pseudo-class-any-link that referenced this issue Jun 29, 2016
* Add failing test

* Pass test

Fix #4. See postcss/postcss-selector-parser#28.
@xuyuanxiang
Copy link

@morishitter

postcss: function plugins(webpack) {
       return [
            require("postcss-pseudoelements")(),
            require("postcss-import")({addDependencyTo: webpack}),
            require("postcss-url")(),
            require("postcss-cssnext")({
                browsers: [
                    "Android 2.3",
                    "Android >= 4",
                    "Chrome >= 35",
                    "Firefox >= 31",
                    "Explorer >= 8",
                    "iOS >= 7",
                    "Opera >= 12",
                    "Safari >= 7.1"
                ]
            }),
            require("postcss-opacity")(),
            require("postcss-vmin")(),
            require("postcss-will-change")(),
            require("postcss-flexbugs-fixes")(),
            require("postcss-gradientfixer")(),
            require("postcss-browser-reporter")(),
            require("postcss-reporter")(),
        ];
    }

I've just to move postcss-pseudoelements before postcss-cssnext. It works...

@xilixinluo
Copy link

@xuyuanxiang this "postcss-pseudoelements" fixed myfault ,thank you a lot~

romainmenke pushed a commit to csstools/postcss-plugins that referenced this issue Nov 16, 2021
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

5 participants