Repository navigation
fix(icons): hochgeladene SVG-Symbole nehmen die Textfarbe an - #8
Merged
Merged
Conversation
Ursache (Rückmeldung vom Spiegel): Ein hochgeladenes SVG mit fill="currentColor" erschien schwarz statt weiß. Hochgeladene Symbole wurden als <img> eingebunden; ein SVG im <img> erbt die Textfarbe nie, currentColor wird dort schwarz. Lösung: Hochgeladene SVGs werden als CSS-Maske gezeichnet, gefüllt mit currentColor (MaskIcon) – weiß am Spiegel, in der Schriftfarbe der Verwaltung. Es wird kein SVG-Code in die Seite eingefügt. PNGs bleiben <img>. Der Server liefert dafür bei Upload-Symbolen contentType mit (IconRef.contentType, nur in Antworten). Prüfung: Go-Tests (contentType in Einstellungen, Dashboard, Schichten, Vorschau; unbekannte Id ohne), Web-Tests (Maske bei SVG, <img> bei PNG und ohne contentType, Verwaltung); Gegenproben schlagen an; Screenshot mit currentColor-SVG am Spiegel und in der Verwaltung; npm run verify -- --race grün, Web-Suite auch unter Node 24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbBgi6nWM5aU7VDrf62V1r
Anlass: Nutzerentscheidung – kleine Korrekturen gehen ohne Tag raus, der Spiegel holt latest von main. Prüfung: Durchsicht. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbBgi6nWM5aU7VDrf62V1r
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbBgi6nWM5aU7VDrf62V1r
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.
Rückmeldung vom Spiegel: Ein hochgeladenes SVG mit
fill="currentColor"erschien schwarz statt weiß.Ursache
Hochgeladene Symbole wurden als
<img>eingebunden. Ein SVG in einem<img>erbt die Textfarbe der Seite nie,currentColorwird dort immer schwarz. Das galt am Spiegel ebenso wie in der Verwaltung.Lösung
currentColorgefüllt (web/src/shared/MaskIcon.tsx, ohne Mantine). Am Spiegel sind sie weiß, in der Verwaltung in deren Schriftfarbe.<img>.contentTypemit (IconRef.contentType, nur in Antworten). Das gilt in den Einstellungen, am Dashboard, bei Schichten und in der Vorschau.CLAUDE.md: Kleine Korrekturen gehen ohne Tag raus; ein Tag kommt nur, wenn ein Stand als Version festgehalten werden soll. Der Changelog führt diesen PR deshalb unter „Unreleased“.Prüfung
contentTypeist in allen Antworten gefüllt, bei einer unbekannten Id fehlt es.contentTypebleibt es beim<img>, auch in der Verwaltung.currentColorerscheint am Spiegel weiß und in der Verwaltung hell.npm run verify -- --raceist grün, die Web-Suite auch unter Node 24. Das Dashboard-CSS enthält weiterhin kein Mantine.Nach dem Merge
Warten, bis die CI auf
maingrün ist. Dann in Arcane das Projektmirrorabrufen und neu deployen. Ein Tag ist nicht nötig.Generated by Claude Code