try fix svg

This commit is contained in:
Help-14 2022-04-26 12:56:52 +07:00 committed by GitHub
parent 1b57a5b2fe
commit 2d4138c00e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,18 @@
{{if .IsImage}}
<img src="{{.Icon}}" class="icon">
{{else if .IsSVG}}
<svg-file src="{{.Icon}}" class="svg-icon"></svg-file>
<svg-file src="{{.Icon}}" class="svg-icon">
<style>
path:nth-child(2n+2) {
fill: var(--foreground); /* shadowDOM style does NOT style global DOM */
}
svg {
fill: var(--foreground);
width: 32px;
height: 32px;
}
</style>
</svg-file>
{{else}}
<i class="{{.Icon}} fa-xl icon"></i>
{{end}}