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
Canvas: Avoid conflicting stylesheets when loading SVG icons #74461
Conversation
tested in Geomap and it doesn't seem to be affected, the markers are keeping their colors, as their should. However, I can't use the SVGs from the escalation, not sure if there's something wrong with them - but they don't work regardless of my changes. @drew08t any idea? geomap_svg.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits - overall looks good and tested locally 💯
(cherry picked from commit 7171b35)
While investigating https://github.com/grafana/support-escalations/issues/7316 we noticed that the SVGs used had the same class names defined between the
<style>
tag, which was causing the SVGs to borrow styling from one to another. The issue doesn't happen for SVGs that don't have custom styling defined.The solution was to add a unique ID to each SVG and use the ID when defining the classes.
Before
svgs_before.mov
After
svgs_after.mov
Fixes https://github.com/grafana/support-escalations/issues/7316
Special notes for your reviewer:
Cases covered:
<style>
Please check that: