From 1ad2e66cbc8469330509f75c378ef78e431cd024 Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Fri, 10 Apr 2026 12:23:07 +0200 Subject: [PATCH] Revert "Use currentColor to style svg (#9316)" (#9799) This reverts commit dc7f2a57bb60188cf428d6304471427fa06c9e84. --- core/ui/EditTemplate/tags.tid | 6 +- core/ui/ViewTemplate/title.tid | 2 +- core/wiki/macros/tag.tid | 1 + core/wiki/macros/thumbnails.tid | 2 +- plugins/tiddlywiki/comments/styles.tid | 2 +- plugins/tiddlywiki/menubar/styles.tid | 16 ++- plugins/tiddlywiki/text-slicer/styles.tid | 2 +- .../tour/simplified-tiddler-with-tags.tid | 1 + plugins/tiddlywiki/tour/styles.tid | 5 +- plugins/tiddlywiki/upgrade/styles.tid | 4 +- themes/tiddlywiki/seamless/base.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 108 ++++++++++-------- 12 files changed, 91 insertions(+), 60 deletions(-) diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index 298120606..bbd3d301e 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -17,11 +17,13 @@ tags: $:/tags/EditTemplate <$let backgroundColor=<> > > - style=`color:$(foregroundColor)$; background-color:$(backgroundColor)$;` + style=`color:$(foregroundColor)$; fill:$(foregroundColor)$; background-color:$(backgroundColor)$;` > <$transclude tiddler=<>/> <$view field="title" format="text"/> - <$button class="tc-btn-invisible tc-remove-tag-button"> + <$button class="tc-btn-invisible tc-remove-tag-button" + style.fill=<> + > <$action-listops $tiddler=<> $field=<> $subfilter="-[{!!title}]"/> {{$:/core/images/close-button}} diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 71b049124..538b0185a 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -2,7 +2,7 @@ title: $:/core/ui/ViewTemplate/title tags: $:/tags/ViewTemplate \whitespace trim -\define title-styles() color:$(foregroundColor)$; +\define title-styles() fill:$(foregroundColor)$;
diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid index 142403602..2c539b42e 100644 --- a/core/wiki/macros/tag.tid +++ b/core/wiki/macros/tag.tid @@ -3,6 +3,7 @@ tags: $:/tags/Macro \define tag-pill-styles() background-color:$(backgroundColor)$; +fill:$(foregroundColor)$; color:$(foregroundColor)$; \end diff --git a/core/wiki/macros/thumbnails.tid b/core/wiki/macros/thumbnails.tid index 83e03b906..213b6520c 100644 --- a/core/wiki/macros/thumbnails.tid +++ b/core/wiki/macros/thumbnails.tid @@ -21,7 +21,7 @@ tags: $:/tags/Macro style="width:$width$px;height:$height$px;background-color:$background-color$;" >
$icon$
$caption$
\end diff --git a/plugins/tiddlywiki/comments/styles.tid b/plugins/tiddlywiki/comments/styles.tid index 62b34c764..ed3cf1ddf 100644 --- a/plugins/tiddlywiki/comments/styles.tid +++ b/plugins/tiddlywiki/comments/styles.tid @@ -25,7 +25,7 @@ tags: [[$:/tags/Stylesheet]] } .tc-comment-button button svg { - color: <>; + fill: <>; height: 2em; width: 2em; } diff --git a/plugins/tiddlywiki/menubar/styles.tid b/plugins/tiddlywiki/menubar/styles.tid index 39ec6c626..26a96be01 100644 --- a/plugins/tiddlywiki/menubar/styles.tid +++ b/plugins/tiddlywiki/menubar/styles.tid @@ -87,6 +87,8 @@ nav.tc-menubar li.tc-menubar-item > button { font-weight: 700; color: <>; color: <>; + fill: <>; + fill: <>; text-decoration: none; padding: 0.5em; margin: 0; @@ -103,14 +105,16 @@ nav.tc-menubar li.tc-menubar-item > button.tc-selected { background: <>; color: <>; color: <>; + fill: <>; + fill: <>; } nav.tc-menubar li.tc-menubar-item svg { transition: none; width: 1em; height: 1em; - color: <>; - color: <>; + fill: <>; + fill: <>; } nav.tc-menubar li.tc-menubar-item .tc-menubar-dropdown-arrow svg { @@ -120,8 +124,8 @@ nav.tc-menubar li.tc-menubar-item .tc-menubar-dropdown-arrow svg { nav.tc-menubar li.tc-menubar-item > a.tc-selected svg, nav.tc-menubar li.tc-menubar-item > button.tc-selected svg { - color: <>; - color: <>; + fill: <>; + fill: <>; } nav.tc-menubar li.tc-menubar-item > a:hover, @@ -131,6 +135,8 @@ nav.tc-menubar li.tc-menubar-item > button:hover { background: <>; color: <>; color: <>; + fill: <>; + fill: <>; border-radius: 0; text-decoration: none; } @@ -142,6 +148,8 @@ nav.tc-menubar li.tc-menubar-item > button:active { background: <>; color: <>; color: <>; + fill: <>; + fill: <>; border-radius: 0; text-decoration: none; } diff --git a/plugins/tiddlywiki/text-slicer/styles.tid b/plugins/tiddlywiki/text-slicer/styles.tid index 328486c81..370b4d684 100644 --- a/plugins/tiddlywiki/text-slicer/styles.tid +++ b/plugins/tiddlywiki/text-slicer/styles.tid @@ -96,7 +96,7 @@ div.tc-edit-template-document-tiddler-heading a:hover { .tc-view-template-document-tiddler-heading-icon svg, .tc-edit-template-document-tiddler-heading-icon svg { - color: <>; + fill: <>; } .tc-view-template-document-tiddler { diff --git a/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid b/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid index c5f27662c..c2c14a7b0 100644 --- a/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid +++ b/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid @@ -3,6 +3,7 @@ title: $:/plugins/tiddlywiki/tour/simplified-tiddler-with-tags \whitespace trim \define tag-pill-styles() background-color:$(backgroundColor)$; +fill:$(foregroundColor)$; color:$(foregroundColor)$; \end diff --git a/plugins/tiddlywiki/tour/styles.tid b/plugins/tiddlywiki/tour/styles.tid index 1a9bf871b..7bb434dab 100644 --- a/plugins/tiddlywiki/tour/styles.tid +++ b/plugins/tiddlywiki/tour/styles.tid @@ -66,6 +66,7 @@ tags: $:/tags/Stylesheet .tc-tour-panel-controls .tc-tour-panel-list-button.tc-selected { color: <>; + fill: <>; background: <>; } @@ -103,6 +104,7 @@ tags: $:/tags/Stylesheet border-radius: 1em; background: <>; color: <>; + fill: <>; text-transform: uppercase; } @@ -165,7 +167,7 @@ tags: $:/tags/Stylesheet } .tc-tour-task svg { - color: <>; + fill: <>; vertical-align: middle; width: 1.2em; height: 1.2em; @@ -238,6 +240,7 @@ tags: $:/tags/Stylesheet .tc-tour-settings-tour-step-launch-button:hover { background: <>; color: <>; + fill: <>; } .tc-tour-settings-tour-step-heading-step-number { diff --git a/plugins/tiddlywiki/upgrade/styles.tid b/plugins/tiddlywiki/upgrade/styles.tid index d6b880be1..944c6a918 100644 --- a/plugins/tiddlywiki/upgrade/styles.tid +++ b/plugins/tiddlywiki/upgrade/styles.tid @@ -20,11 +20,11 @@ tags: $:/tags/Stylesheet .tc-upgrade-wizard svg.tc-image-download-button { width: 14em; height: 14em; - color: <>; + fill: <>; } .tc-upgrade-wizard:hover svg.tc-image-download-button { - color: <>; + fill: <>; } .tc-upgrade-wizard svg .tc-image-download-button-ring { diff --git a/themes/tiddlywiki/seamless/base.tid b/themes/tiddlywiki/seamless/base.tid index 0f07c3529..21656aa9e 100644 --- a/themes/tiddlywiki/seamless/base.tid +++ b/themes/tiddlywiki/seamless/base.tid @@ -94,7 +94,7 @@ html:-webkit-full-screen { /* Adjust the colour of the page controls */ body.tc-body .tc-page-controls svg { - color: <>; + fill: <>; } /* Adjust the colour of the sidebar selected tabs */ diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index b5bedd5fb..12b5ded3d 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -94,6 +94,7 @@ button:-moz-focusring, input:-moz-focusring, textarea:-moz-focusring, select:-mo html button { line-height: 1.2; color: <>; + fill: <>; background: <>; border-color: <>; cursor: pointer; @@ -104,6 +105,10 @@ button:disabled { color: <>; } +button:disabled svg { + fill: <>; +} + /* ** Basic element styles */ @@ -126,7 +131,7 @@ body.tc-body { <> color: <>; background-color: <>; - fill: currentColor; + fill: <>; } <>; + fill: <>; } /* @@ -606,6 +611,7 @@ button svg, button img, label svg, label img { border: none; cursor: pointer; color: <>; + fill: <>; } button:disabled.tc-btn-invisible { @@ -631,6 +637,10 @@ html body.tc-body .tc-btn-boxed svg { color: <>; } +html body.tc-body .tc-btn-boxed:hover svg { + fill: <>; +} + .tc-btn-rounded { font-size: 0.5em; line-height: 2; @@ -644,7 +654,7 @@ html body.tc-body .tc-btn-boxed svg { html body.tc-body .tc-btn-rounded svg { font-size: 1.6666em; - color: <>; + fill: <>; } .tc-btn-rounded:hover { @@ -653,10 +663,14 @@ html body.tc-body .tc-btn-rounded svg { color: <>; } +html body.tc-body .tc-btn-rounded:hover svg { + fill: <>; +} + .tc-btn-icon svg { height: 1em; width: 1em; - color: <>; + fill: <>; } @@ -680,6 +694,7 @@ html body.tc-body .tc-btn-rounded svg { margin: 4px 8px 4px 8px; background: <>; color: <>; + fill: <>; border: none; border-radius: 2px; font-size: 1.2em; @@ -692,6 +707,7 @@ html body.tc-body .tc-btn-rounded svg { height: 2em; width: 2em; vertical-align: middle; + fill: <>; } .tc-primary-btn { @@ -704,6 +720,7 @@ html body.tc-body .tc-btn-rounded svg { .tc-sidebar-lists button { color: <>; + fill: <>; } .tc-sidebar-lists button.tc-btn-mini { @@ -744,11 +761,11 @@ button svg.tc-image-button, button .tc-image-button img { .tc-unfold-banner svg, .tc-fold-banner svg { height: 0.75em; - color: <>; + fill: <>; } .tc-unfold-banner:hover svg, .tc-fold-banner:hover svg { - color: <>; + fill: <>; } .tc-fold-banner { @@ -903,11 +920,11 @@ button.tc-btn-invisible.tc-remove-tag-button { } .tc-topbar svg { - color: <>; + fill: <>; } .tc-topbar button:hover svg { - color: <>; + fill: <>; } @media (max-width: <>) { @@ -920,6 +937,7 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-sidebar-header { color: <>; + fill: <>; } .tc-sidebar-header .tc-title a.tc-tiddlylink-resolves { @@ -969,11 +987,11 @@ button.tc-btn-invisible.tc-remove-tag-button { } .tc-page-controls svg { - color: <>; + fill: <>; } .tc-page-controls button:hover svg, .tc-page-controls a:hover svg { - color: <>; + fill: <>; } .tc-sidebar-lists .tc-menu-list-item { @@ -1270,7 +1288,7 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-tiddler-controls button svg, .tc-tiddler-controls button img, .tc-search button svg, .tc-search a svg { - color: <>; + fill: <>; } .tc-tiddler-controls button svg, .tc-tiddler-controls button img { @@ -1285,12 +1303,12 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-tiddler-controls button.tc-selected svg, .tc-page-controls button.tc-selected svg { - color: <>; + fill: <>; } .tc-tiddler-controls button.tc-btn-invisible:hover svg, .tc-search button:hover svg, .tc-search a:hover svg { - color: <>; + fill: <>; } @media print { @@ -1418,6 +1436,7 @@ html body.tc-body.tc-single-tiddler-window { vertical-align: middle; background-color: <>; color: <>; + fill: <>; border-radius: 4px; padding: 3px; margin: 2px 0 2px 4px; @@ -1448,6 +1467,7 @@ html body.tc-body.tc-single-tiddler-window { .tc-editor-toolbar button:hover { background-color: <>; + fill: <>; color: <>; } @@ -1528,43 +1548,43 @@ html body.tc-body.tc-single-tiddler-window { */ .tc-page-controls svg.tc-image-new-button { - color: <>; + fill: <>; } .tc-page-controls svg.tc-image-options-button { - color: <>; + fill: <>; } .tc-page-controls svg.tc-image-save-button { - color: <>; + fill: <>; } .tc-tiddler-controls button svg.tc-image-info-button { - color: <>; + fill: <>; } .tc-tiddler-controls button svg.tc-image-edit-button { - color: <>; + fill: <>; } .tc-tiddler-controls button svg.tc-image-close-button { - color: <>; + fill: <>; } .tc-tiddler-controls button svg.tc-image-delete-button { - color: <>; + fill: <>; } .tc-tiddler-controls button svg.tc-image-cancel-button { - color: <>; + fill: <>; } .tc-tiddler-controls button svg.tc-image-done-button { - color: <>; + fill: <>; } .tc-page-controls svg.tc-image-layout-button { - color: <>; + fill: <>; } /* @@ -1704,7 +1724,7 @@ html body.tc-body.tc-single-tiddler-window { .tc-edit-field-remove svg { height: 1em; width: 1em; - color: <>; + fill: <>; vertical-align: middle; } @@ -1818,7 +1838,7 @@ html body.tc-body.tc-single-tiddler-window { .tc-btn-dropdown svg, .tc-btn-dropdown img { height: 1em; width: 1em; - color: <>; + fill: <>; } .tc-drop-down-wrapper { @@ -1841,15 +1861,15 @@ html body.tc-body.tc-single-tiddler-window { } .tc-drop-down button svg, .tc-drop-down a svg { - color: <>; + fill: <>; } .tc-drop-down button:disabled svg { - color: <>; + fill: <>; } .tc-drop-down button.tc-btn-invisible:hover svg { - color: <>; + fill: <>; } .tc-drop-down .tc-drop-down-info { @@ -2336,6 +2356,7 @@ html body.tc-body.tc-single-tiddler-window { .tc-manager-list-item-heading-selected { font-weight: bold; color: <>; + fill: <>; background-color: <>; } @@ -2473,7 +2494,7 @@ html body.tc-body.tc-single-tiddler-window { } .tc-alert-toolbar svg { - color: <>; + fill: <>; } .tc-alert-subtitle { @@ -2530,12 +2551,14 @@ html body.tc-body.tc-single-tiddler-window { border-bottom: none; background: <>; color: <>; + fill: <>; } .tc-drafts-list a:hover { text-decoration: none; background: <>; color: <>; + fill: <>; } .tc-drafts-list a svg { @@ -2568,16 +2591,13 @@ html body.tc-body.tc-single-tiddler-window { display: flex; text-shadow: none; border: 1px solid <>; + fill: <>; background-color: <>; margin: 0.5em 0 0.5em 0; padding: 4px; align-items: center; } -.tc-plugin-info svg { - color: <>; -} - .tc-sidebar-lists a.tc-tiddlylink.tc-plugin-info { color: <>; } @@ -2619,14 +2639,11 @@ a.tc-tiddlylink.tc-plugin-info:hover { text-decoration: none; background-color: <>; color: <>; -} - -a.tc-tiddlylink.tc-plugin-info:hover svg { - color: <>; + fill: <>; } a.tc-tiddlylink.tc-plugin-info:hover > .tc-plugin-info-chunk > svg { - color: <>; + fill: <>; } a.tc-tiddlylink.tc-plugin-info:hover > .tc-plugin-info-chunk .tc-plugin-info-stability { @@ -2750,6 +2767,7 @@ a.tc-tiddlylink.tc-plugin-info:hover > .tc-plugin-info-chunk .tc-plugin-info-sta font-weight: bold; background: green; color: white; + fill: white; border-radius: 4px; padding: 3px; } @@ -2940,7 +2958,7 @@ input.tc-palette-manager-colour-input { width: 0.7em; height: 0.7em; vertical-align: middle; - color: <>; + fill: <>; } .tc-table-of-contents ol { @@ -3063,6 +3081,7 @@ html body.tc-dirty svg.tc-image-save-button-dynamic .tc-image-save-button-dynami } html body.tc-dirty span.tc-dirty-indicator, html body.tc-dirty span.tc-dirty-indicator svg { + fill: <>; color: <>; } @@ -3149,7 +3168,7 @@ html body.tc-dirty span.tc-dirty-indicator, html body.tc-dirty span.tc-dirty-ind .tc-thumbnail-wrapper:hover .tc-thumbnail-icon svg, .tc-thumbnail-wrapper:hover .tc-thumbnail-icon img { - color: #fff; + fill: #fff; <> } @@ -3256,7 +3275,7 @@ html body.tc-dirty span.tc-dirty-indicator, html body.tc-dirty span.tc-dirty-ind } .tc-tree svg { - color: #acacac; + fill: #acacac; } .tc-tree span svg { @@ -3373,6 +3392,7 @@ span.tc-translink > a:first-child { } .tc-test-case-result-icon { + fill: #fff; padding: 0.25em; display: inline-block; line-height: 0; @@ -3381,10 +3401,6 @@ span.tc-translink > a:first-child { <> } -.tc-test-case-result-icon svg { - color: #fff; -} - .tc-test-case-result-icon-pass { background-color: green; } @@ -3418,7 +3434,7 @@ span.tc-translink > a:first-child { } .tc-test-case-toolbar svg { - color: <>; + fill: <>; } .tc-test-case-toolbar .tc-drop-down {