-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Adopt rtlcss in order to deal with automatic handling of rtl CSS files whenever possible #1621
Comments
Are you thinking that this will be implemented as a compiled CSS file that is used only when an RTL language is chosen? This seems like a win-win. |
In general i do not like that much the solutions that dupliate the file cause they leak information, like that the user is an RTL user, leak a lot, but we can evenually serve anyhow both the files and use one of them on the client. The same apply sadly for the translations that generally are really bigger, but we can evaluate to gzip them inside the client so to pack them and reduce their size. |
Having a single file is an option discussed by in MohammadYounes/rtlcss#34 and doable with https://github.com/rtsao/postcss-rtlcss-combined but as rightly identified by @MohammadYounes that could lie various isues due to the css hierarchies so for the meantime let's simply accept to have two different files. |
@evilaliv3 you are in general referring to the issue of analysis of HTTPS traffic. That issue is larger in scope than one or two CSS files. My understanding of the Tor browser was that this issue is addressed by noise generated in the Tor network. |
There is also postcss-inline-rtl which inlines the minimum amount of RTL CSS you need and solves the specifity problem. |
thanks @MohammadYounes! we will keep that in mind! |
Implemented! if you would like to cite us as your early users we would love that! :) GlobaLeaks, the first open-source whistleblowing framework built using AngularJS, Bootstrap and Twisted! |
Sure, update the readme and send a PR. Also RTL-bootstrap might be of interest to you (with JS components RTL support) |
Thanks. Yes all our interest in rtlcss is mainly for boostrap, but we found RTL-bootstrap still not not handled that well and not aligned with bootstrap 3.3.6 and the latest patches; Would it take time to do a proper clean patching? p.s. i've already tried also The code of the nav is a standard use of some Bootstrap classes so probably simply using rtlcss works best now: <ul class="nav nav-pills nav-stacked">
<li data-ng-class="active.content">
<a href="#/admin/content">
<i class="glyphicon glyphicon-chevron-right"></i>
<span data-translate>General settings</span>
</a>
</li>
<li data-ng-class="active.users">
<a href="#/admin/users">
<i class="glyphicon glyphicon-chevron-right"></i>
<span data-translate>User management</span>
</a>
</li>
...
</ul> \cc @jakob101 |
I'd like to see what's the issue with postcss-inline-rtl, and resolve it :) |
sure @jakob101, reach me even on skype if you like; my nick handle is 'evilaliv3' |
I'll rebase with bootstrap master later today. |
great @MohammadYounes! let me know if i can help somehow. what would be great instead of a simple rebase would be to do a patching with few organized commits atop of a clean 3.3.6 that is likely to be the final stable version of bootstrap; probably something done with rtlcss/postcss-inline-rtl is likely to be integrated in bootrap [1] and would be a great benefit for the community out there: morteza/bootstrap-rtl#98 |
Currently it's 3.3.5 (comparison). It has 1 extra feature that wasn't merged. I thought about sending a PR, but they made it clear no RTL support will be added to v3 |
Okay, my suggestion is to squash it a little having in this order to have atop of 3.3.6
i'm unsure if it would be a good result to relase it using postcss-inline-rtl so to have a single file that can do both depending on the rtl direction. |
Yeah, using postcss-inline-rtl will make it easier for distribution. I'll do it later tonight :) |
I pushed inline-rtl branch, to get a working local build, postcss-inline-rtl requires the following updates:
😴 👋 |
A preview of the docs can be found @ http://mohammadyounes.github.io/RTL-bootstrap/inline |
You, my man, are great! Thanks, I missed that. Hope you had a good night sleep :) On 3 April 2016 at 01:50, Mohammad Younes notifications@github.com wrote:
|
Thanks :) |
This is amazing! other suggestions that comes to my mind:
question: we are using https://github.com/angular-ui/bootstrap; is there some particular tweak you did to the official bootstrap JS that should be probably be done there (p.s. i do not want you to look at the whole code, simply guess given your experience). reference ticket: angular-ui/bootstrap#4762 |
thanks @MohammadYounes you are doing really an amazing job! :) |
@evilaliv3 Thanks :) The only change to JS was in tooltip placement since it was done via JS not CSS. For Angular UI, the same needs to be done here. I'm still waiting for @jakob101 to update postcss-inline-rtl before users can actually build this! |
I just noticed that carousel transition is not working as expected :( I'll check it later tonight. |
ah! anyway i'm thinking to change back from angular-ui/bootstrap to http://mohammadyounes.github.io/RTL-bootstrap/inline! let's do it :) as soon that it will be ready and aligned with the 3.3.6 i will one shot do the change! |
ah no damn, for various reasons we would still need to run us anguar-ui/bootstrap for the more control it offers us in angular :( i will so try to build a patch for the tooltips in RTL as you did in http://mohammadyounes.github.io/RTL-bootstrap/inline |
@MohammadYounes I will update tomorrow, I'm still out of the country! :) On Sun, Apr 3, 2016 at 5:51 AM -0700, "Giovanni Pellerano" notifications@github.com wrote: ah no damn, for various reasons we would still need to run us anguar-ui/bootstrap for the more control it offers us in angular :( i will so try to build a patch for the tooltips in RTL as you did in http://mohammadyounes.github.io/RTL-bootstrap/inline — |
@jakob101 Take your time :) @evilaliv3 I updated the branch:
Now it's fully converted :) |
Great @MohammadYounes! I was about to integrate it in globaleaks but what we miss is:
if it is good and you also think this would help easy the process what we can do is too fork your project under the GlobaLeaks organization; assign you permissions to commit on the specific repository where to collaborate; i can handle the publishing on the bower and sign the releases that could have a numbering 3.3.6-our.numbering. this way then for our personal use i will do the same for angular-ui/bootstrap-rtl let me know if this plan is ok for you. |
what i was about to do is to use:
but this forces me to download the whole repository and in addition the repository currently miss the build in the i've a doubt in the release numbering as bootstrap uses X.Y.Z but semver does not allow X.Y.Z.K with a forth number like 1.2.3.4: semver/semver#168 |
probably the idea that comes to my mind is to always tag the same version of the current release of bootstrap, and whenever we apply changes simply delete the tag and re-tag it with the same current numbering. but i do not know if bower will be then able to do upgrade recognizing that the tag is different |
@evilaliv3 I will commit the I think this would be the last version in v3, and for v4 they mentioned it's to be added in a future minor release:
For now, I believe it's easier to have the |
@evilaliv3 tagged under 3.3.6 |
The rtlcss by @MohammadYounes seems to work really well in handling automagically RTL conversion of CSS written for LTR.
That library is already used by wordpress and is under evaluation by the bootstrap: twbs/bootstrap#19555
It would be interesting to adopt it in the project instead of caring of all manually
The text was updated successfully, but these errors were encountered: