Reputation: 2201
I recently decided to use RTLCSS to make RTL versions of my stylesheetes. Now i'm trying to use Declaration-level directives to tell RTLCSS what to do, but SASS compiles my comments to next line.
For example, font-size: 14px/*rtl:15px*/;
Compiles to
font-size: 14px;
/*rtl:15px*/
And that stops RTLCSS from procssing it properly. Is there a way around this? can i configure sass to just compile the value as-is, preserving comment position?
P.S. I use grunt-sass(node-sass) to process my scss files.
Upvotes: 3
Views: 998
Reputation: 2417
Both standard /rtl:.../ and special/important /!rtl:.../ notations are supported.
You can use /!rtl: to escape from sass compiler
Upvotes: 0
Reputation: 5149
Use SASS interpolation syntax, passing your comment as string
body{ font-size: 14px #{"/*rtl:15px*/"}; }
will produce
body { font-size: 14px /*rtl:15px*/; }
Upvotes: 6