-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Bootstrap RTL the correct way #38412
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
Conversation
All our current css is doing bootstrap the wrong way for rtl support. The problem is NOT with our own scss as in general this is now correct with logical properties or dir=rtl The problem is with the actual bootstrap code. We are using it without addressing any RTL issues with that. With the exception of a very incomplete set of bootstrap overrides in https://github.com/joomla/joomla-cms/blob/7cf5e1228db337881d7678ad1c71915d5c885150/build/media_source/templates/administrator/atum/scss/vendor/bootstrap/_bootstrap-rtl.scss Bootstrap 5 is designed to be post-processed using rtlcss - This takes the generated template.css and converts it to template-rtl.css This PR is my draft where I am working through all the current scss and either removing any rtl specific code that can be automatically handled by rtlcss or by using rtlcss specific markup (just as bootstrap itself does) ## Benefits - it is DRY - we don't need to remember to check it works in rtl (we almost always do) - fixes numerous open issues - replaces numerous open pull requests - fixes several issues with input buttons not already on the tracker.
|
Requires an entry point in the templates ending with `-rtl.scss`, eg `template-rtl.scss`
|
Thanks @dgrammatiko |
wilsonge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMAZING if this works. I looked when I plumbed in 5.x and it seemed really painful to migrate everything. Thought it was way more work than this. Really nice job!
Well it was 14hours solid so not a small amount - plus dont forget all the PR since you did the first work where I moved our own css to logical properties |
|
Yeah that makes a lot of sense. Still really nice work though :) |
|
Thanks, merging stuff like this as early as possible brings us more time to iron out regressions, even when the chance is small that there will be one. |
|
except it cant be tested right now :(
I hope this means that pull requests wont wait as RTC for weeks and months before merging any more |
|
Updated the branch, should be back to normal. |
|
Thanks @laoneo |
|
I have tested this item ✅ successfully on 4609b33 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38412. |
|
thanks for testing. dpc was one of the components I developed this with ;) |
build/media_source/templates/site/cassiopeia/scss/vendor/bootstrap/_custom-forms.scss
Outdated
Show resolved
Hide resolved
…trap/_custom-forms.scss Co-authored-by: Quy <[email protected]>
|
I have tested this item ✅ successfully on 95ba902 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38412. |
|
made some tests, but i'm not a RTL user... |
|
fyi I use RTL a lot which is why I spent the time making the pr |
|
I would like to merge this PR into 4.3 early on. I will merge it tomorrow if there are not any issues by then. |
|
is it tomorrow yet? |
|
Was hoping to hear from reviewers... |
|
Thank you Brian @brianteeman for this needed fix and for keeping track. |
Update to changes from following PRs: - joomla#38353 - joomla#38412 - joomla#38823 Remove wrong '/build/media_source ...' added with PR joomla#38353 .
This PR is using bootstrap the way that bootstrap intended for it to be used since 5.0 for RTL.
removing any rtl specific code that can be automatically handled by rtlcss or by using rtlcss specific markup (just as bootstrap itself does)
All our current css is doing bootstrap the wrong way for rtl support.
The problem is NOT with our own scss as in general this is now correct with logical properties (The few instances of dir=rtl are now handled by rtlcss)
The problem is with the actual bootstrap code. We are using it without addressing any RTL issues with that. With the exception of a very incomplete set of bootstrap overrides in https://github.com/joomla/joomla-cms/blob/7cf5e1228db337881d7678ad1c71915d5c885150/build/media_source/templates/administrator/atum/scss/vendor/bootstrap/_bootstrap-rtl.scss
Technically this will change all left to right etc so we dont need to use logical properties in our own css however I still think its good practice that we continue to use logical properties where available.
Bootstrap 5 is designed to be post-processed using rtlcss - This takes the generated template.css and converts it to template-rtl.css
Benefits
Testing
npm iThis will generate all the css and install rtlcss
Or
2.Use a prebuuilt package
Sample Tests
Global configuration in arabic
Before
After
Add Multi-Factor Authentication
Before
After