Conversation
|
I'm very glad that finally you considering including RTL support! I've brought it up several months ago, and i want to repeat myself a bit. Another thing to keep in mind is that some of the js components of twbs are also not direction-agnostic and need to be adopted to support RTL. |
|
+1 |
|
Making things RTL is not a new problem where right-to-left scripts are used. When you were working on Bootstrap v2, I always wanted something like theme capability, that you can change whatever you want (to some degree) without changing the core (the reference). The best method so far, seems to be the theme solution. You've added theming capability without any actual use. RTL will be one of the first real world application for it. Right-to-left is nothing more than representation, and adding mixins or variables is nonsense to me. Core bootstrap has to be clean and minimal, and semantically consistent. RTL is not semantic, and core module of BT3 has to be concerned about semantic, not different representations of a component. Let me predict what will happen in the future if you add RTL support to the core by variables and mixins (and not as a theme): It will continue the way Semantic-UI and Foundation went: No consistency and sometime different representations from the original bootstrap. So here is what I believe is the best practice: Close this WIP, and leave it to the projects like https://github.com/morteza/bootstrap-rtl or similar ones, where they develop a theme on top of Bootstrap 3, to make it RTL. When they need RTL, its CSS will be added like a regular theme. Otherwise it will be removed. No big deal. That's it. The separate file solution is the best answer to the issue, and including it in the core less files would be redundant. It's just another representation! Nothing more. It has to be removed completely from the core, and it seems enough that you reference some of the themes developed for this capability. |
|
Here are some issues I've faced when developing RTL theme for BT3:
Long story short, in long term, the Bootstrap project has to move toward BIDI solutions like what happened in operating systems world. Bidirectional texts and representations seems more fit than RTL. RTL is just a theme, nothing more. Cheers. |
|
We are using our enhanced version of R2. It makes things less error prone than maintaining separate files. Consider code generating the RTL stuff at build time. |
|
Nice work guys. |
|
I have to say, I'm really in favor of the current strategy for adding RTL support (a separate override file). An important requirement and argument against using mixins is having content of different languages in the same page (for example, an english website containing an article in arabic). This can easily be supported using a prefixed RTL version like the one mentioned above, but would be impossible to do using mixins. I believe such a use-case will become more common as more websites support multilingual content or accessibility standards such as "Language of Parts" become widespread. |
|
Please, whatever solution you choose, make sure to allow both |
|
@OlivierJaquemet, are you try flip theme from |
|
+1 for the separate file |
|
I totally agree with the points both 'hero-m' and 'OlivierJaquemet' described above. I am the lead designer of a multilingual CMS, https://github.com/modusinternet/custodian-cms, which allows administrators to add content to their website in any language. i.e. If a visitors language preferences are set to Hindi but the default language of the website is English, so long as the admin has added accompanying Hindi versions of the English content, then Hindi will appear. In areas where no Hindi translation is yet available then the default English will appear. This means I may have up to 2 languages dynamically appearing on the same page which use different directional properties. |
|
@morteza, I believe you have a point, yet I think the best approach is to change the core, if not for in-core support then at least for more semantic mixins, like instead of using pull-right and pull-left it should be pull-start and pull-end. |
|
+1 for the separate file |
|
I don't think this debate on using pull-start|end vs pull-right|left is productive at all. Any themer can define a pull-start|end class in his theme and get it done right in seconds. This is not the issue. The issue is when a themer uses pull-right|left in his theme and we want to use the theme in an RTL page, the layout shouldn't break. it should be consistent. and the current overrides on pull-right|left as suggested by @mdo fixes this issue. |
|
Sure. Just ignore that start|end thing for now ;) |
|
I agree with @hero-m's comment. And I completely disagree with calling them RTL and LTR. BIDI seems more appropriate for what we actually looking for. So here is a possible solution:
I've already done it initially, and it seems clean in design, and easy to deploy. I don't know... |
|
I have been using using bi-app On Thu, Dec 19, 2013 at 6:42 AM, Mark Otto notifications@github.com wrote:
איתי רז 0544.635.797 |
|
Punting on this implementation for the time being. |
|
Can you tell me about the result of this WIP? |
|
Successor: #12840. |
|
I have been using https://github.com/twitter/css-flip or On Sat, May 3, 2014 at 11:30 AM, Chris Rebert notifications@github.comwrote:
איתי רז 0544.635.797 |
This is a heavily WIP pull request to add RTL support to v3.1.
Strategy
There are two primary ways to implement RTL: rewrite the core files to include mixins for directional properties, or a separate optional file. I've opted for the latter here.
Implementation
This stubs out the ground work for adding RTL by updating the Gruntfile to compile and minify the CSS files for
bootstrap-rtl.cssfromrtl.less. It also adds an example, based on the Theme example, to showcase the changes. Currently it looks like this:Feedback
I'm pausing here to get feedback from folks. This results in a lot of duplicate code, which sucks in some ways and doesn't in others. I'd love for folks to weigh in on things to be aware of, alternate implementations, bugs in what I've done thus far, oversights, etc.