rtlcss icon indicating copy to clipboard operation
rtlcss copied to clipboard

How to use rtlcss in vuejs?

Open mahmoudabdelhalim opened this issue 3 years ago • 4 comments

mahmoudabdelhalim avatar Apr 04 '21 22:04 mahmoudabdelhalim

Hi everyone, something here? I need implement it for Vue Js with element ui

yamelsenih avatar Aug 13 '21 00:08 yamelsenih

hi, add postcss.config.js file in the root of project with this content:

module.exports = {
  plugins: {
    'rtlcss':{
      autoRename: true
    }
  }
}

because vue-loader use postcss by default and rtlcss is a postcss plugin

alphaelf avatar Nov 15 '21 12:11 alphaelf

Hi, I did the above (added rtlcss in postcss.config.js). But what if i want to have the plugin only on certain pages and on others not? The problem is right now installing RTLCSS has some styling side effect on pages that should not be affected, even i defined in my global scss that i want to only use ltr (and ignore rtl):

* {
  /*rtl:ignore*/
  direction: ltr!important;
}

tina-pina avatar Jun 08 '23 09:06 tina-pina

Hi, just use block ignore template:

/*rtl:begin:ignore*/
* {
direction: ltr;
}
/*rtl:end:ignore*/

alphaelf avatar Jun 10 '23 07:06 alphaelf