[openstreetmap/openstreetmap-website] Use svg stack for role icons (PR #4741)

Anton Khorev notifications at github.com
Tue Apr 30 06:47:55 UTC 2024


I wanted to change the colors of the role icons but we had a heap of files in `app/assets/images/roles` and I didn't feel like editing them.

We're already using svg images. If we can require browsers to support [svg fragment ids](https://caniuse.com/svg-fragment) we'll be able to replace all those files with one [svg sprite stack](https://www.sitepoint.com/use-svg-image-sprites/#svgspritestacks).
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Use svg stack for role icons

-- File Changes --

    A app/assets/images/roles.svg (24)
    D app/assets/images/roles/administrator.png (0)
    D app/assets/images/roles/administrator.svg (60)
    D app/assets/images/roles/blank_administrator.png (0)
    D app/assets/images/roles/blank_administrator.svg (89)
    D app/assets/images/roles/blank_importer.png (0)
    D app/assets/images/roles/blank_importer.svg (65)
    D app/assets/images/roles/blank_moderator.png (0)
    D app/assets/images/roles/blank_moderator.svg (65)
    D app/assets/images/roles/importer.png (0)
    D app/assets/images/roles/importer.svg (71)
    D app/assets/images/roles/moderator.png (0)
    D app/assets/images/roles/moderator.svg (71)
    M app/helpers/authorization_helper.rb (2)
    M app/helpers/user_roles_helper.rb (10)
    M test/helpers/user_roles_helper_test.rb (50)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4741
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4741 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240429/d3788ed0/attachment.htm>


More information about the rails-dev mailing list