Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The CSS reset renders SVGs as invisible.
Proposed resolution
Exclude them from the reset.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff-2907420-3-4.txt | 577 bytes | DyanneNova |
#4 | 2907420-4.patch | 488 bytes | DyanneNova |
#3 | 2907420-3.patch | 492 bytes | tedbow |
Comments
Comment #2
tim.plunkettComment #3
tedbowThis fixes it for me.
UPDATE: nope I was wrong. Fixes the svg issue but causes others.
Comment #4
DyanneNovaThis removes the reset on anything inside the svg element.
Comment #5
tedbow@DyanneNova thanks!
I tested this manually and it works and does not introduce the other problems that my patch in #3 caused.
If this gets committed before #2784443: Move off-canvas functionality from Settings tray module into drupal.dialog.ajax library so that other modules can use it then it will need to be added to that patch.
Comment #6
lauriii@tedbow could you document the steps you used for testing this manually?
Comment #7
tedbow@lauriii I am using this test module https://github.com/tedbow/D8-Tester
It has a configuration form that adds circle using
<svg>
Without the patch the circle is not visible, with the patch in #4 it is.
I tried to write test to prove this using similar code as the test module but
<svg>
and the<circle>
both show up asisVisible()
returns true regardless of weather the patch is applied. So I am not sure this something we can test for.Comment #9
lauriiiI tested this manually using the module linked on #7. Thank you @tedbow!
Committed 2c77fff and pushed to 8.5.x. Thanks!
Since this only affects settings tray which is currently in beta, we most likely would like to backport this to 8.4.x branch as well. I will ask feedback on that from another committer.
Comment #11
tedbow@lauriii thanks for committing!
Failed because against 8.5.x. Testing against 8.4.x. Switching back to RTBC
Comment #13
xjmOops, looks like missed the request for a backport check. This looks patch-safe to me; it's a straightforward bug, it doesn't touch the public "API" CSS, and after all Settings Tray itself is still beta.
So I cherry-picked this to 8.4.x as well. Thanks!