Closed svieujot closed 1 year ago
Hi @svieujot, By default we will remove the double quotes around the css property. That might be an issue here.
"1.3em/1.2"
. We will remove these double quotes by default. raw_str("content")
. Please let me know if this solves the problem. You can find reference here.Hello @abishekatp . Thank you for the feedback.
I tried several combinations of those but I can't make it work.
Please see this test:
#[test]
fn test_55() {
let style = style_test! {
.btn.disabled::after {
content: url(raw_str(r#"data:image/svg+xml;charset=UTF-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='red' d='M256 8C119.034 8 8 z'></path></svg>"#));
}
};
assert_eq!(
style,
r#".btn.disabled.test::after{content: url("data:image/svg+xml;charset=UTF-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='red' d='M256 8C119.034 8 8 z'></path></svg>");}"#
);
}
Am I doing something wrong ?
I think the following code will solve this problem.(Thank you for you patience 😀)
#[test]
fn test_55() {
let style = style_test! {
.btn.disabled::after {
content: r#"url("data:image/svg+xml;charset=UTF-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='red' d='M256 8C119.034 8 8 z'></path></svg>")"#;
}
};
assert_eq!(
style,
r#".btn.disabled.test::after{content: url("data:image/svg+xml;charset=UTF-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='red' d='M256 8C119.034 8 8 z'></path></svg>");}"#
);
}
Indeed it does.
Thank you !
The following rule gets rendered without the quotes around the url.