Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi everyone!
in this PR, Vuesax is now supporting RTL completely!
I've checked every component, to make sure that the native LTR did not change,
and to make sure that each component supports RTL
How to use?
to activate RTL, you can pass the rtl option when calling function use()
if you want to turn on or off RTL at any time, you can just write:
this.$vs.rtl = true // or false
this.$vs.rtl
is also reactive, so you can use Vue watcher as below:Updates on Vuesax in this PR
RTL support feature based on two mixins,
propWithDir
&dirValue
I explained each one of them in the
mixins.styl
file, I hope you check it outone of the major changes I did, that I used Vue.prototype._init function
to parse properties, and access the Vue instance, check
override.js
I added a new file in
this file contains the RTL logic,
the logic of the RTL is based on injecting vuesax-app-is-rtl class in the HTML element
in case of RTL, and it will Inject vuesax-app-is-ltr in ltr case,
the two mixins,
propWithDir
&dirValue
, will create new two classesone for the RTL, another one for the LTR directions
example:
the full explanation of
propWithDir
&dirValue
mixins inmixins.styl
fileResolve #93 #176 #581