Automatically Convert CSS to RTL #3237
geniuskrul
started this conversation in
Ideas
Replies: 1 comment
-
Please see https://css-tricks.com/building-multi-directional-layouts/ for possible ways to implement directional aware styles. This is out of scope for sveltekit |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi✌️
What if there was an automatic way to convert any website, any library, and third-party component's CSS to RTL (and vice versa).
John Doe creates a component and uploads it on NPM. John Doe 2 downloads that component and uses it on an RTL website. Now John Doe 2 needs to manually translate the styles of the component to RTL, or maybe he can install a third-party package...
What if SvelteKit did this automatically? I install SvelteKit and start building my component to publish on NPM. The default direction is
ltr
. maybe the user can config it from thehtml dir="ltr"
or a config option insvelte.config
file.Hmmm, now I realized that there needs to be a config to tell the SvelteKit that this third-party component is built-in RTL or LTR. Maybe the SvelteKit package can handle such a thing?
I just wanted to put this out there.
Also, let's talk about only the website without any third-party stuff. If my website's primary direction is "LTR", if this later changes to "RTL", this means that all CSS needs to get transformed...
Maybe we can discuss this topic/idea until the Svelte developers find free time after doing the important things...
Beta Was this translation helpful? Give feedback.
All reactions