CssSyntaxError: Unclosed bracket

368 Views Asked by At

In my react project,Imported CSS from react-datepicker is throwing error, After debugging into the css of react-datepicker found out that multiple not:() selector are causing the issue.If I comment that css, Project complies without any error.I am using stylus, stylelint and postcss in my project. Below is the CSS code which is causing the issue and it is valid syntax

range:not(.react-datepicker_day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker_month--selecting-range .react-datepickermonth-text--in-range:not(.react-datepicker_day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker_month--selecting-range .react-datepickeryear-text--in-range:not(.react-datepickerday--in-selecting-range,.react-datepickermonth-text--in-selecting-range,.react-datepickerquarter-text--in-selecting-range,.react-datepicker_year-text--in-selecting-range) {
  background-color: #f0f0f0;
  color: #000;
}

Below is the screenshot of the error css syntaxerror

postcss version: 8.4.21 stylus version: 0.59.0 stylelint version: 15.2.0

I created a ticket on postcss but as per them it might be issue with Stylus parser for PostCSS . Below is the link of ticket https://github.com/postcss/postcss/issues/1818

0

There are 0 best solutions below