Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTL support #2037

Closed
mahmoudmy opened this issue Dec 28, 2016 · 17 comments
Closed

RTL support #2037

mahmoudmy opened this issue Dec 28, 2016 · 17 comments

Comments

@mahmoudmy
Copy link

mahmoudmy commented Dec 28, 2016

Thanks guys,
That's a really nice project.
Do you have any plan for RTL support in css? (for languages like Persian, Arabic, ...)

@Leopoldthecoder
Copy link
Contributor

Thanks.
We don't have plans to add RTL support, but there may be some third party libraries you can use with Element, like rtlcss.

@MahdiMajidzadeh
Copy link

no plan to add rtl with contribution neither ??

@osman-mohamad
Copy link

do you have any guides about using element-ui with rtlcss ?

@KayvanMazaheri
Copy link

Has anyone find a solution for using Element with RTL languages? Any suggestions would be appreciated.
@mahmoudmy @MahdiMajidzadeh @osman-mohamad

@osman-mohamad
Copy link

osman-mohamad commented Aug 20, 2017

@KayvanMazaheri I did found a solution . you can use postcss-loader in your project with postcss rtlcss plugin . and it will convert all the styles to rtl .
plus :

body,html {
   direction: ltr
}

in the App.vue Component style section

@siavash-sajjad
Copy link

@osman-mohamad
hi my friend
can you help me to add and usage rtlclass to laravel-vue project?

@osman-mohamad
Copy link

@siavash-sajjad put the repository url here . for me to review it .

@kooshkestani
Copy link

@Leopoldthecoder hi tree element not support rtl .
how to customize tree-node.vue
:style="{ 'padding-left': (node.level - 1) * tree.indent + 'px' }">to padding-right???

@moosti
Copy link

moosti commented May 27, 2019

+1

@ghyath5
Copy link

ghyath5 commented Sep 2, 2019

How can I use rtlcss in my nuxtjs project ?
and did you find another way to support RTL in element?

@kooshkestani
Copy link

@ghost
Copy link

ghost commented Mar 19, 2020

+1

1 similar comment
@hitautodestruct
Copy link

+1

@hasanisaeed
Copy link

@Leopoldthecoder Still have no plans for RTL support?

@mra-dev
Copy link

mra-dev commented Feb 24, 2022

It would be so good if we had it.

@mahsamirzapour
Copy link

Thanks guys, That's a really nice project. Do you have any plan for RTL support in css? (for languages like Persian, Arabic, ...)

Hi homie, just use like this:
html {
direction: rtl;
}
[class*='el-col-'] {
float: right;
}

@kriem2000
Copy link

kriem2000 commented Dec 13, 2023

As I saw that the rtlcss plugin solved the problem, but not in my application case where i use both rtl and ltr directions so the rtlcss is always converts the styles into rtl regardless of the html dir value, any solution for this issue?

here's my vite.config.js file:

import { fileURLToPath, URL } from 'node:url';
import rtlcss from 'rtlcss';
import { defineConfig } from 'vite';
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
import vue from '@vitejs/plugin-vue';
import tailwindcss from 'tailwindcss';


export default defineConfig({
  css: {
    postcss: {
      plugins: [
        rtlcss,
        tailwindcss,
      ],
    },
  },
  plugins: [
    vue(),
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    }),
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url)),
    },
  },
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests