Commit 5c83ca46 authored by Jan Köster's avatar Jan Köster
Browse files

test colr

parent e12c7be3
Loading
Loading
Loading
Loading
+5 −5
Changes for editor/widgets/trustlinks/trustlinks.cpp: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -730,14 +730,14 @@ extern "C" {
                        std::string viewBox, inner;
                        svgmarkup::parse(item.customIconSvg, viewBox, inner);
                        std::string vb = viewBox.empty() ? "0 0 24 24" : viewBox;
                        // fill="currentColor": inherits the link's own text color
                        // (linkTextColor, set on the <a> below via CSS `color`) so
                        // the icon automatically matches/contrasts correctly instead
                        // of rendering in whatever color it happened to be authored.
                        // Explicit Icon Color wins (independent of linkTextColor);
                        // otherwise fall back to currentColor, which inherits the
                        // link's own text color (set on the <a> below via CSS `color`).
                        std::string iconFill = validCss(iconColor) ? iconColor : "currentColor";
                        std::string iconSvgHtml =
                            "<span style=\"display:inline-flex;width:1.1em;height:1.1em;vertical-align:middle;margin-right:6px;\">"
                            "<svg width=\"100%\" height=\"100%\" viewBox=\"" + vb +
                            "\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">" + inner + "</svg></span>";
                            "\" fill=\"" + iconFill + "\" xmlns=\"http://www.w3.org/2000/svg\">" + inner + "</svg></span>";
                        try {
                            libhtmlpp::HtmlString htmlBuf(iconSvgHtml);
                            libhtmlpp::Element &parsed = htmlBuf.parse();