Hi,
Using RTLCss a great tool for multi-lang sites.. it turns your LTR
styles into RTL
styles, so you write your styles 1 time only and magic happens 馃寛
my RTL
css files are simply a copy of my LTR
one with slight modifications like fonts etc..
with the example below, both files turned into RTL
styles 馃槩
i need a way to separate the PostCss
plugins, i cant find anything on the subject..
Cannot Mix 2 CSS files with different PostCSS setup..
mix.sass('resources/assets/sass/app_en.scss', 'public/css');
mix.sass('resources/assets/sass/app_ar.scss', 'public/css').options({
postCss: [require('rtlcss')()]
});
doing this manually during every time you change styles is a real pain 馃槺
Thanks
Yeah Mix doesn't work that way. Sorry, probably not possible to do what you need right now.
@JeffreyWay understandable, but a way to separate setups would be great
did a little workaround .. here it is for the 2 people out there who may need this..
i used the mix then()
event and triggered the RTLCss
with nodejs exec()
const exec = require('child_process').exec
mix.sass('resources/assets/sass/app_en.scss', 'public/css')
.sass('resources/assets/sass/app_ar.scss', 'public/css');
mix.then(() => {
exec('rtlcss ./public/css/app_ar.css ./public/css/app_ar.css', (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.log(`stdout(RTLCSS): ${stdout}`);
console.log(`stderr(RTLCSS): ${stderr}`);
});
});
馃榾
Better than running the rtlcss
manually each time you change the styles. Works for me.
Most helpful comment
@JeffreyWay understandable, but a way to separate setups would be great
did a little workaround .. here it is for the 2 people out there who may need this..
i used the mix
then()
event and triggered theRTLCss
with nodejsexec()
馃榾