[openstreetmap/openstreetmap-website] Fix icons on RTL/Arabic About page (#1585)

Nick Doiron notifications at github.com
Fri Jul 14 02:08:57 UTC 2017


OSM uses the R2 gem to "flip" CSS for right-to-left languages. I have filed [this bug](https://github.com/mzsanford/R2rb/issues/17) in their repo as well.

On the about page (screenshot attached) only one of the icons is visible for Arabic or other rtl languages. This is happening because R2 "flips" the background-position of the icons to an invalid value. One icon escapes because its background-position does not match the RegEx used by the gem.  Even if this were valid CSS, we would not want to change/flip our sprite coordinates.

My recommendation is to use 0 or possibly ```-0px``` instead of ```0px``` as the x-coordinate here until R2 has some change to avoid sprites.

OSM is already using this syntax (intentionally or not, I don't know) on icon.search which has ```background-position: 0 0;```

![screen shot 2017-07-13 at 3 58 57 pm](https://user-images.githubusercontent.com/643918/28195348-55c28e64-67e5-11e7-8d2e-18dae72c350d.png)
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/1585

-- Commit Summary --

  * Hide background-position from R2 CSS gem

-- File Changes --

    M app/assets/stylesheets/common.scss (10)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/1585.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1585.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1585
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170714/ea3629a6/attachment.html>


More information about the rails-dev mailing list