-
Notifications
You must be signed in to change notification settings - Fork 20
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
Data URL encoding breaks css! #59
Comments
The parsing error is trigger not by the base 64, but by the semicolon after let class = css!(r#"
a[target="_blank"]::after{
content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==");
margin: 0 3px 0 5px;
}
"#); url tokens are a special case in css syntax and are somewhat insane leftovers from long gone days of the early browser wars. Literally `url(any string not containing a closing parens)` is supposed to be accepted, instead of the much more sane `url("just write it as a string duh")`. This is only the case for the `url` function-token. No other token behaves that way. Sorry for not being able to literally copy-paste css :/ |
The new parser should be coming relatively soon and should have a way to deal with If there's a workaround that works at the moment, I think this issue can be solved with the new parser. |
I was following this tutorial and noticed something in base64 breaks the macro at compile time.
This passes:
This panics:
Producing code
The text was updated successfully, but these errors were encountered: