-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
RTLing with directive #47
Comments
Is this a specific case or generic one ? Can you detail your use case along with an online sample ? |
I came across this scenario while working on a website, and the use case is same as mentioned above. You can try to apply RTLCSS on this block of css.
I was expecting that it will replace the 'right' with 'left' as it is supposed to do so, but if I add the directive, then it does not replace as such. |
I meant a real world scenario use-case, The target is to convert LTR CSS to RTL. Can you explain how an LTR CSS would contain: .somediv {
right: 0px;
} and its RTL counterpart needs to be: .somediv{
right: 5px;
} Thanks! |
I am using JQuery Chosen plugin. The chosen plugin shows as dropdown arrow image that has the following css:
when I apply RTLCSS to this, it produces:
But the arrow looks odd in that position (It is not odd in original css, because, the arrow has 5 pixels transparent area on the right)... So I want it to move 5px. Hope this clarifies the situation. ... (I am sorry if this is beyond the scope of your plugin and if I am asking too much. I was just asking if is possible.. In other case I can look for some alternative work around. Thanks) |
Thanks for the details, I was just trying to understand the situation in order to provide a solution. I would suggest the following:
.chosen-container-single .chosen-single div {
padding-right: 5px;
} Or
{
"name": "custom",
"expr": /(?:\/\*(?:!)?rtl-custom:)([^]*?)(?:\*\/)/img,
"action": function (decl) {
this.expr.lastIndex = 0;
var newValue = this.expr.exec(decl.raws.value.raw)[1];
decl.raws.value.raw = newValue;
return false;
}
} .somediv {
left: 0 /*rtl-custom:5px*/;
} |
Thanks Younes, I really appreciate your work. |
Sometimes we need not only to RTL the css, but to change the value as well; For example here is my source css
Desired Output:
Actual Output (Not desired):
Is there anyway I can achieve this in current version?
The text was updated successfully, but these errors were encountered: