[openstreetmap/openstreetmap-website] Added color preview box in tag browser sidebar (#1779)

Štefan Baebler notifications at github.com
Mon Mar 5 21:31:03 UTC 2018

Applied to the colour tags (https://wiki.openstreetmap.org/wiki/Key:colour) in the sidebar, having:
* key either:
  * colour
  * building:colour
  * ref:colour
  * roof:colour
* and value either:
  * 3 or 6 character hex code prefixed by "#", case insensitive (eg "#ffaabb" or "#fff" or "FF0505") or
  * w3c colour name (case insensitive, eg "deeppink" or "DEEPPINK" or "DeepPink"...), full list from https://www.w3.org/TR/css-color-3/#svg-color
In such cases a 20px x 20px color preview box is floated to the right of the tag value field to be as unintrusive as possible, but still allowing the color preview and confirming the editors that the tag was entered correctly.


You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Added color preview box in tag browser sidebar

-- File Changes --

    M app/assets/stylesheets/common.scss (9)
    M app/helpers/browse_helper.rb (14)
    M config/locales/en.yml (1)
    M test/helpers/browse_helper_test.rb (90)

-- Patch Links --


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

More information about the rails-dev mailing list