Comments (5)
This seems to have been fixed in the latest version of css
. Please re-open if it still occurs in the latest version 2.2.1. If you're running an older version you can expect that there will be bugs that have been fixed.
from css.
@conradz Did you actually test that it works inside phantomjs
with [email protected]
? As I mentioned I had issues using that version inside phantomjs
last time I tried, but will try again now.
from css.
So @conradz I tested this myself now in [email protected]
(I had to manually revert this commit, as it doesn't work in phantomjs
) - and it doesn't work in this version either, in phantomjs
.
with this test css:
.breakingDeclaration{filter:unquote("()")}html{color:red;}div{color:blue;}
outside phantomjs -- correct
css.parse
outside of phantomjs
produces an ast with rules.length 3:
.breakingDeclaration
property: filter
value: unquote("()")
html
property: color
value: red
div
property: color
value: blue
inside phantomjs -- incorrect
whereas inside phantomjs
everything gets incorrectly collapsed into the broken declaration, ast rules.length 1:
.breakingDeclaration
property: filter
value: unquote("()")}html{color:red;}div{color:blue
Like I said from the beginning, I'm not sure if there's anything you can do about this form your libraries point of view. Just wanted to clarify that is doesn't get fixed by latest version.
Cheers
from css.
I just don't have enough understanding of what css.parse
does that could yield a different result when run inside phantomjs
. I might just rewrite my usage so I do the parsing outside of phantomjs, seralise the ast, and then pass it in.
from css.
OK, thanks for the clarification, I hadn't understood that it was specific to phantomjs. Yeah I would think that the best way would be to parse in Node, transferring the CSS source to Node instead of parsing in phantomjs. Most likely an issue with regex matching in phantomjs, although I couldn't guarantee that is the problem.
from css.
Related Issues (20)
- Hi is there any type definitions for this library ?
- " and &apos are not recognized
- undefined:2:1230: property missing ':' when using background with Data URI HOT 5
- Parsing of URL fields
- Trying to get in touch regarding a security issue HOT 4
- Declaration parsing fails with this mess of quotes, brackets & braces HOT 1
- Duplicate packages detected in the css project on Tag: v3.0.0
- Comments in a string are lost
- Mycss HOT 2
- [email protected] dependency is deprecated HOT 12
- Typescript support, performance optimization and browser friendly version (no source-map) HOT 6
- @layer is not supported with css v3 HOT 1
- Fork to continue work: https://github.com/node-projects/css-parser HOT 1
- @container support
- property missing ':' when styles have url with quotes
- Security Vulnerability report HOT 1
- Css
- Declaration matcher by regular expression is finishing too early.
- CSS
- CSS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from css.