MohammadYounes / rtlcss

Framework for transforming Cascading Style Sheets (CSS) from Left-To-Right (LTR) to Right-To-Left (RTL)
https://rtlcss.com
MIT License
1.68k stars 129 forks source link

Last value directive is ignored in Sass compressed mode #176

Closed anoukinsyde closed 3 years ago

anoukinsyde commented 4 years ago

The last value directive in a list is ignored when Sass is set to compressed mode. This is because the compressed mode will automatically remove the trailing semicolon. The value directive is ignored if it isn't followed by a trailing semicolon. This is currently causing issues for me.

These work: .element { transform: none #{'/*!rtl:scaleX(-1) */'}; }

.element { transform: none #{'/*!rtl:scaleX(-1) */'}; z-index:1 }

But this doesn't work (sass compressed): .element { transform: none #{'/*!rtl:scaleX(-1) */'} }

Hope someone can look into this. Thanks in advance.

MohammadYounes commented 3 years ago

This is an old issue related to postcss see (https://github.com/postcss/postcss/issues/1110). I'll keep it open to try and handle it from rtlcss side once I find the time!

MohammadYounes commented 3 years ago

With ee9dc53237e73b725f800a9a7a392cfc53f67e4a you can place the comment anywhere inside the decl. value. for example:

.element { transform: #{'/*!rtl:scaleX(-1) */'} none }