Comments (5)
Unfortunately I think that will make it much harder for me to review changes to the stylesheets... Basically part of what I do when reviewing changes is:
- Look through the diff for
common.css
etc to see if any rules have been added which have an unbalanced effect on left/right values and which are therefore direction specific and arrange for any such rules to be moved toltr.css
. - Use a visual comparison tool to look at a side by side comparison of
ltr.css
andrtl.css
to make sure that they are same except for left and right being reversed.
Doing what you suggest will obviously render this process impossible in it's current form.
from openstreetmap-website.
I can see the benefit of that. I am going to think more about this, but for now, I'll stick with the established pattern.
Regularily jumping between multiple stylesheets makes CSS difficult to write. I wonder if there's a way to use Sass variables to reverse our left:
's to rights
's and so forth. Then we only need one stylesheet, and redefine the variables based on reading direction. That could potentially be a great solution right? I don't know enough about Sass to know if this is feasible.
Edit: here's an example of how this might work: http://amitkazmirsky.com/2011/05/29/dry-your-rtl-and-ltr-css-files-in-rails-with-sass/
from openstreetmap-website.
As you discovered, yes it can be done with variables. It can also be done with mixins, as shown here:
http://anasnakawa.github.com/bi-app-sass/
Both give a result that is not exact clean though. Another option, which I'm currently investigating, is to use R2 with a shim to integrate it into the asset serving.
from openstreetmap-website.
I've created tomhughes/openstreetmap-website@2af0d2a which uses R2 to automatically reverse the stylesheet - it's running at http://tomh.apis.dev.openstreetmap.org/ if people want to test it.
from openstreetmap-website.
I merged my fix last week.
from openstreetmap-website.
Related Issues (20)
- Unable to start local server HOT 1
- Misoriented altitude labels on contour lines HOT 2
- [Duplicate] Changeset comment text is lost when switching entity pages HOT 1
- Changeset comment text is lost when switching entity pages HOT 6
- Reports via website do not reach DWG HOT 7
- Are /api/0.6/notes/addPOIexec, closePOIexec etc api entry point still necessary? HOT 2
- Add support for friends' diary entries RSS feeds HOT 2
- Refactor traces georss description partial HOT 1
- Avoid lego translation in trace descriptions
- (Launchpad having problems) HOT 1
- Network location provider at "https://www.googleapis.com/”: ERR CONNECTION TIMED OUT. HOT 1
- Order of comments in changeset comments feeds HOT 1
- Content Security Policy HOT 1
- Names/numbers of tracks at stations in the "Standard" map layer HOT 2
- missing en.javascript translation HOT 9
- Add option to change interface language HOT 2
- Snap to highways/cities on low-zoom placement of navigation markets HOT 11
- Make new message notification red colored HOT 2
- Global element versioning HOT 1
- Input type=number for export lat/lon inputs? HOT 3
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 openstreetmap-website.