Fix host CSS breaking toolbar icons (#58)#136
Merged
benjitaylor merged 1 commit intoMar 10, 2026
Conversation
|
@stevysmith is attempting to deploy a commit to the Benji Taylor's Projects Team on Vercel. A member of the Team first needs to authorize it. |
6431cc2 to
6c8f9c8
Compare
Scope SVG fill protection under container classes to prevent leaking into host page SVGs. Replace inline <style> tags with CSS module classes to prevent host CSS from overriding icon state transitions.
6c8f9c8 to
249a887
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
svg[fill="none"]fill protection rules under.toolbar,.markersLayer,.fixedMarkersLayer, and.popupcontainer classes to prevent leaking into host page SVGs (fixes the regression reported by @msllrs)<style>tags in animated icons with CSS module classes to prevent host CSS likesvg * { opacity: 1 !important }from overriding icon state transitionsWhat was broken
svg[fill="none"] { fill: none !important }was unscoped, breaking host SVGs that usefill="none"with CSS-based fills (e.g. Tailwind'sfill-current)<style>tags used global class names (.copy-icon,.check-icon) and inlinestyle={{ opacity }}which host CSS could override, causing both icon states to render simultaneouslyChanges
icon-transitions.module.scss.visible,.hidden,.sending)icons.tsx<style>tags +style={{ opacity }}with CSS module classNamespage-toolbar-css/styles.module.scss.toolbar,.markersLayer,.fixedMarkersLayerannotation-popup-css/styles.module.scss.popupHow it works
CSS module class names are hashed at build time (e.g.
.hidden___ETykt), so they can't collide with host page styles. The!importanton opacity gives specificity0,1,0which beats common host rules likesvg * { opacity: 1 !important }at0,0,1.Closes #58