-
Notifications
You must be signed in to change notification settings - Fork 99
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 comments #36
Comments
I have a not yet released fork of CSSOM that does it like this: {
cssRules: [
{
selectorText: ".icon",
properties: [
{
name: "background-image",
value: "url(./arrow.png)",
important: false,
original: "\nbackground-image: url(./arrow.png); /*sprite: spr1.png*/\n"
},
{
name: "width",
value: "24px",
important: false,
original: "width: 24px;\n"
}
],
originalSelector: ".icon ",
originalAppendix: ""
}
]
} |
It's almost what i expected to see in CSSOM. It would really help me. Thanking you in anticipation! |
@jsmarkus I've done something very similar here: https://github.com/One-com/assetgraph-sprite -- except that I put the spriting instructions into vendor-prefixed CSS properties. That actually turned out to be very pleasant to work with because it's valid CSS. |
@NV If you don't want to merge this into master, can you push this as a separate branch? |
I am going to use your parser for CSS sprites generator.
It would be convenient to parse comments as properties annotations like in the following example:
The text was updated successfully, but these errors were encountered: