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

Error CSS validity #206

Closed
chrisvidal opened this issue Aug 3, 2014 · 7 comments
Closed

Error CSS validity #206

chrisvidal opened this issue Aug 3, 2014 · 7 comments

Comments

@chrisvidal
Copy link

Hi

i got this error from gulp csso, but i dont understand the console log to fix the origin of the issue 👍 thks for any help

/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:399
throw new Error('Please check the validity of the CSS block starting f
^
Error: Please check the validity of the CSS block starting from the line #1994
at throwError (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:399:15)
at checkStylesheet (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:1921:22)
at Object.CSSPRules.stylesheet (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:365:40)
at _getAST (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:409:38)
at exports.srcToCSSP (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:2287:16)
at Object.exports.srcToCSSP (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:2292:16)
at exports.parse (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/cssoapi.js:7:21)
at Object.exports.justDoIt (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/node_modules/csso/lib/cssoapi.js:21:41)
at Transform.stream._transform (/Users/Tsun/Sites/alpha/node_modules/gulp-csso/index.js:39:34)
at Transform._read (_stream_transform.js:179:10)

@marani
Copy link

marani commented Aug 16, 2014

Please check your line #1994 at the original css file that generates this problem, it is usually somewhere inside .tmp folder, depends on your configs.

I got the same problem today, the line that causes same error for me is:
.main-container-fixed .course-pref-col .ctn-course-list .course-table td:nth-child(4) .index-btn:not(.btn-success, .select-preview-positive):hover {...
Seems like csso fails at parsing multiple class inside :not, which is a valid css selector (this is a line from a working code of another project I copy into a new project using gulp & gulp-csso as a placeholder to benchmark gulp, suddenly this line throws an error). Try removing that not-multiple-class selector, csso runs fine.

Wondering what your broken line looks like?

Also, it seems like the main devs for this project are quite busy atm, too many opened issues just makes me consider using alternatives for better consistency..

@chrisvidal
Copy link
Author

Hi,
error just disapeared :/ i disbaled for a while the plugin then enable it again one week later.
and here we go, seems to work like a charm now ... hence i have no clue of previous the issue :/

@JiLiZART
Copy link

JiLiZART commented Nov 9, 2014

Have the same problem.
In my css file i found
* border: 1px solid #ccc

@CristianMR
Copy link

I have the same problem with display: block;

.oldie .flexnav li:hover > ul {
  display: block;
  width: 100%;
  overflow: visible;
}

@sotayamashita
Copy link

I have the same problem. detail is below:

/path/to/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:399
        throw new Error('Please check the validity of the CSS block starting f

Error: Please check the validity of the CSS block starting from the line #1
    at throwError (/path/to/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:399:15)
    at checkStylesheet (/path/to/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:1921:22)
    at Object.CSSPRules.stylesheet (/path/to/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:365:40)
    at _getAST (/path/to/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:409:38)
    at exports.srcToCSSP (/path/to/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:2287:16)
    at Object.exports.srcToCSSP (/path/to/node_modules/gulp-csso/node_modules/csso/lib/gonzales.cssp.node.js:2292:16)
    at exports.parse (/path/to/node_modules/gulp-csso/node_modules/csso/lib/cssoapi.js:7:21)
    at Object.exports.justDoIt (/path/to/node_modules/gulp-csso/node_modules/csso/lib/cssoapi.js:21:41)
    at Transform.stream._transform (/path/to/node_modules/gulp-csso/index.js:39:34)
    at Transform._read (_stream_transform.js:179:10)

and then �I check #1 in refer to @marani 's comment below:

Please check your line #1994 at the original css file that generates this problem, it is usually somewhere inside .tmp folder, depends on your configs.

Here is my style below:

@charset "UTF-8";
/*------------------------------------*\
    $ANALYTICS
\*------------------------------------*/
/*!*
 *
 *
 *
 */
/**
 *
 * 
 * 
 *
 */

@lahmatiy
Copy link
Member

lahmatiy commented Dec 8, 2015

@marani Yep, parser don't support for selector list in :not(). This was added in CSS Selectors Level 4 that's still in draft. As I know, only WebKit developers working on it. But I don't know if any released browser support it. If it's an issue, please, fill the separate issue.

@CristianMR Your example parsing ok.
@sotayamashita Your example parsing ok too.

@nowherenearithaca
Copy link

While old - just want to saw thanks here. I was suddenly getting a screwy error with csso and from the notes here alerted me to possible css stuff = in my case, I had an ":ev" instead of ":even" that seemed to be tripping it up

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

7 participants