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

Add basic RTL support #8424

Closed
wants to merge 3 commits into from
Closed

Add basic RTL support #8424

wants to merge 3 commits into from

Conversation

alaa13212
Copy link

Add basic RTL support

@cvrebert
Copy link
Collaborator

cvrebert commented Jul 8, 2013

Having 2 copies of every LESS file doesn't seem workable/maintainable.

@cvrebert
Copy link
Collaborator

cvrebert commented Jul 8, 2013

Attempts to fix #175.

@alaa13212
Copy link
Author

What about writing rtl.less file.

@dir: right;
@import "bootstrap.less";

And mirror-mixins.less

.float(@pos) when (@dir = left){
  float: @pos;
}
.float(left) when (@dir = right){
  float: right;
}
.float(right) when (@dir = right){
  float: left;
}

.clear(both) {
  clear: both;
}
.clear(@pos) when (@dir = left){
  clear: @pos;
}
.clear(left) when (@dir = right){
  clear: right;
}
.clear(right) when (@dir = right){
  clear: left;
}

.text-align(center) {
  text-align: center;
}
.text-align(@pos) when (@dir = left){
  text-align: @pos;
}
.text-align(left) when (@dir = right){
  text-align: right;
}
.text-align(right) when (@dir = right){
  text-align: left;
}

// etc..

Then use

p {
 .float(left);
 .clear(left);
 .text-align(right);
}

@cvrebert
Copy link
Collaborator

cvrebert commented Jul 9, 2013

Yes, that kind of approach is better.
You should read @mdo's comment in #6423 (comment) though. Seems he wants to start with just 1 widget/component and then proceed from there.

@mdo
Copy link
Member

mdo commented Jul 9, 2013

Yup, this has come up numerous times. It's way more difficult to try to review and manage a pull request that adds all this without first figuring out and documenting our approach with one component. There are other issues in addition to that, but we need to start small and go from there.

@mdo mdo closed this Jul 9, 2013
@alaa13212
Copy link
Author

I will start in navs.less file. :)

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

Successfully merging this pull request may close these issues.

3 participants