jjlharrison / gulp-rtlcss

Gulp plugin that uses RTLCSS to convert LTR CSS to RTL.
MIT License
36 stars 7 forks source link

rltcss can read scss? #14

Closed aloky closed 6 years ago

aloky commented 6 years ago

Me seem rtlcss cant read scss

oscarhandsome commented 6 years ago

rtlcss rewrite css to css

aloky commented 6 years ago

And such an opportunity will appear?

jjlharrison commented 6 years ago

Correct, it's called "rtlcss" not "rtlscss".

Normal use of this plugin is to compile LESS or SCSS to CSS first and then convert that into RTL CSS.

See the example in the README.

iJadou commented 3 years ago

@jjlharrison usually we work on scss files, if we want to use RTLCSS value directives such as .example {font-size:16px/*rtl:14px*/;}

jjlharrison commented 3 years ago

@iJadou You need to make sure your comment directive is making it through to RTLCSS. With SCSS you can use a /*! */ comment to preserve the comment even when compiling in compressed mode. See https://sass-lang.com/documentation/syntax/comments:

If a comment begins with /*!, though, it will always be included in the CSS output.

iJadou commented 3 years ago

@jjlharrison Thank you, it works. 🌹

DeoThemes commented 2 years ago

I'm having the same issue and Sass is removing the comment if it's placed after the value.

This doesn't work even with a "!" font-size: 14px/*!rtl:12px*/;

MohammadYounes commented 2 years ago

@DeoThemes see https://rtlcss.com/learn/usage-guide/value-directives/#Tip

DeoThemes commented 2 years ago

@MohammadYounes Wow, thanks a lot, it worked :)