Comments (6)
Is this a specific case or generic one ? Can you detail your use case along with an online sample ?
from rtlcss.
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.
.somediv {
right : 0px /*rtl:5px*/;
}
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.
from rtlcss.
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!
from rtlcss.
I am using JQuery Chosen plugin. The chosen plugin shows as dropdown arrow image that has the following css:
.chosen-container-single .chosen-single div {
right:0px;
}
when I apply RTLCSS to this, it produces:
.chosen-container-single .chosen-single div {
left:0px;
}
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)
from rtlcss.
Thanks for the details, I was just trying to understand the situation in order to provide a solution. I would suggest the following:
- Customize the rule to fix the issue without affecting the LTR version:
.chosen-container-single .chosen-single div {
padding-right: 5px;
}
Or
- Add your own decl. level directive to change the value and allow further processing:
{
"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*/;
}
from rtlcss.
Thanks Younes,
I really appreciate your work.
from rtlcss.
Related Issues (20)
- Ignore import not working HOT 5
- The background-position declarations are flipped differently on version v4.0.0 HOT 3
- background-position: HOT 2
- Integrating with Codeigniter
- Bootstrap 5.2 LTR and RTL at the same time (scss with Laravel vite) HOT 14
- using blacklist HOT 3
- aliases options don't work HOT 1
- Don't process data URLs
- Support src() with processUrls
- processUrls shouldn't process non-URL expressions in at-rules
- Bootstrap RTL and LTR at the same time HOT 2
- Unknown word error when "//' is used for commenting in scss files. HOT 1
- issue with media queries and onlyDiff option HOT 1
- This rtlcss package how to use in Laravel vite.config.js HOT 2
- RTLCSS Online
- RTLCSS errors when processing a value directive marked as important
- Tabbed menu not compatible HOT 5
- Can't deal with CSS
- Can't handle CSS style without semicolon HOT 2
- After compilation, ignore is invalid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtlcss.