-
Notifications
You must be signed in to change notification settings - Fork 1.2k
css problem #441
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
Comments
maybe related #440 |
Hi @Ankitjasoliya. Would you be able to provide some more details about this error? Where are you seeing it? What steps can we take to reproduce it? |
Hi solonaarmstrong, Thanks for the reply After Node Module Install I will load style.css throw error for (Unclosed bracket (3803:37)) in React Module Thanks |
Which version of Polaris are you using? How are you importing the css? These specifications in the issue template are helpful for us: Specifications
|
Which version of Polaris are you using? How are you importing the css? These specifications in the issue template are helpful for us: Specifications |
I'm hitting the same problem now with an application created with create-react-app v2. How to replicate:
Here's the console listing of the error:
|
Alternate attempt using
The error is now
|
@nerfologist Thank you for the details on how to reproduce. I see the problem now and we're working on a fix. |
I ran into this as well. My temporary workaround is to use node-sass as @nerfologist described and comment out the full
|
We've hit this exact same issue now related to the upgrade of react-scripts to v2.0.4 |
Apologies for the issue. I have a fix and it will be released soon. I will post an update here. |
Hi there folks. After a morning of node_modules spelunking I think we have gotten to the bottom of this. create-react-app v2 includes postcss-preset-env which is a neat little tool that transpiles some of your CSS for support in older browsers. Unfortunately the transform that it uses for custom-properties has a bug in it where it doesn't work if you have multiple custom properties inside a linear gradient. Guess what we have inside the RangeSlider? Yep, multiple custom-properties inside a linear gradient. We believe we've discovered another way of expressing what we want to do that will correctly transpile in spite of the above bug. Until we release a new version of Polaris, I suggest you disable the custom-properties transpilation by installing react-app-rewired and react-app-rewire-postcss. These two plugins will allow you to customize your postcss webpack config without ejecting. Your config-overrides.js would look something like this: module.exports = config => {
require('react-app-rewire-postcss')(config, {
plugins: loader => [
require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
// This is the one line that is different from the built-in config
features: { 'custom-properties': false}
}),
]
});
return config;
}; |
@solonaarmstrong @BPScott Any plans to release a point release of Polaris 2.12 with this fix? |
No plans on a 2.12 as we've been prepping for v3.0 which we're hoping to release within the next week |
Thanks for the update @BPScott, sounds good on the 3.0 release. (and good luck on it!) |
Looks like you don't need to wait on us. postcss-custom-properties has just released a new version that fixes the bug that triggered this. Update to postcss-custom-properties v8.0.9 (as per postcss/postcss-custom-properties#150) and the problem should go away. |
I’m sorry I didn’t have more free time to look at the issue when it was reported. As mentioned, it’s been fixed in PostCSS Custom Properties and a new patch release is published. This was taken into PostCSS Preset Env and from that a new patch release is published. |
Not a problem @jonathantneal. We're all busy and deserving of downtime. |
I can confirm that latest postcss-custom-properties upgrade + Polaris work fine now. I'm running Create React App 2.1.1 and Polaris 2.12.1 without issue now. If you're still having issues, you might need to delete your node_modules and (package|yarn).lock file. That will likely result in additional dependencies being upgraded though, so keep that mind. Thanks for the update @BPScott. |
I am using polaris 4.6.1 with node.js 10.16.3 The code works fine until I add this line
When I run the dev. I get the following error.
|
I also get the following error:
|
You have to use this plugin in order to use css files in nextjs: https://github.com/zeit/next-plugins/tree/master/packages/next-css Additionally add webpack (if is not currently added). Finally create a next.config.js in your root folder:
|
./node_modules/@shopify/polaris/styles.css (./node_modules/css-loader??ref--7-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./node_modules/@shopify/polaris/styles.css)
Unclosed bracket (3803:37)
3801 | background-color:#c4cdd5;
3802 | background-color:var(--progress-upper, #c4cdd5);
The text was updated successfully, but these errors were encountered: