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

Parsing errors #16

Closed
TheJaredWilcurt opened this issue Dec 10, 2022 · 1 comment
Closed

Parsing errors #16

TheJaredWilcurt opened this issue Dec 10, 2022 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@TheJaredWilcurt
Copy link
Member

Passing in some valid CSS from Bootstrap 2:
Code:

const redPerfumeCss = require('./index.js');
const input = `
@media (min-width:768px) and (max-width:979px) {
  .hidden-tablet { display:none!important }
}
`;
const results = redPerfumeCss({ input });

Error:

_________________________
Red-Perfume-CSS:
Error parsing CSS. TypeError: Cannot read properties of undefined (reading 'join')
    at red-perfume-css\src\css-parser.js:107:58
    at Array.forEach (<anonymous>)
    at cssParser (red-perfume-css\src\css-parser.js:106:29)
    at atomize (red-perfume-css\src\atomize.js:266:14)
    at redPerfumeCss (red-perfume-css\index.js:19:10)
    at Object.<anonymous> (red-perfume-css\manual-testing.js:249:17)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)

I assume this is related to the media query syntax in some manner. Needs further investigation.

@TheJaredWilcurt TheJaredWilcurt added the bug Something isn't working label Dec 10, 2022
@TheJaredWilcurt TheJaredWilcurt added the help wanted Extra attention is needed label Dec 14, 2022
@TheJaredWilcurt
Copy link
Member Author

Will be fixed by #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: Done
Development

No branches or pull requests

1 participant