From 17857fe6b0cbfc853f56583a7c6539036439ee23 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Thu, 26 Dec 2024 23:02:33 -0500 Subject: [PATCH 01/11] Mostly fix monochrome svg rendering color --- ext/css/structured-content.css | 11 +++++++++-- ext/js/display/structured-content-generator.js | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ext/css/structured-content.css b/ext/css/structured-content.css index 747a1d33dd..f966aec40d 100644 --- a/ext/css/structured-content.css +++ b/ext/css/structured-content.css @@ -19,6 +19,7 @@ /* Glossary images */ .gloss-image-container { display: inline-block; + white-space: nowrap; max-width: 100%; max-height: 100vh; position: relative; @@ -92,7 +93,13 @@ object-fit: contain; border: none; outline: none; +} +.gloss-image-link[data-has-aspect-ratio=true] .gloss-image { + position: absolute; + left: 0; + top: 0; width: 100%; + height: 100%; } .gloss-image-link[data-image-rendering=pixelated] .gloss-image, .gloss-image-link[data-image-rendering=pixelated] .gloss-image-background { @@ -137,9 +144,9 @@ } .gloss-image-link[data-appearance=monochrome] .gloss-image { - filter: grayscale(1); + filter: grayscale(1) opacity(0.5) drop-shadow(0 0 0 var(--text-color)) saturate(1000%) brightness(1000%); } -.gloss-image-link:not([data-appearance=monochrome]) .gloss-image-background { +.gloss-image-background { display: none; } diff --git a/ext/js/display/structured-content-generator.js b/ext/js/display/structured-content-generator.js index 6ff8cf12f6..29a3c2e969 100644 --- a/ext/js/display/structured-content-generator.js +++ b/ext/js/display/structured-content-generator.js @@ -98,6 +98,9 @@ export class StructuredContentGenerator { const imageContainer = this._createElement('span', 'gloss-image-container'); node.appendChild(imageContainer); + const aspectRatioSizer = this._createElement('span', 'gloss-image-sizer'); + imageContainer.appendChild(aspectRatioSizer); + const imageBackground = this._createElement('span', 'gloss-image-background'); imageContainer.appendChild(imageBackground); @@ -120,6 +123,8 @@ export class StructuredContentGenerator { node.dataset.sizeUnits = sizeUnits; } + aspectRatioSizer.style.paddingTop = `${invAspectRatio * 100}%`; + if (typeof border === 'string') { imageContainer.style.border = border; } if (typeof borderRadius === 'string') { imageContainer.style.borderRadius = borderRadius; } imageContainer.style.width = `${usedWidth}em`; From cd07cb7c340fb8c300c48ae8f227ac14eae7d42c Mon Sep 17 00:00:00 2001 From: kuuuube Date: Thu, 26 Dec 2024 23:05:33 -0500 Subject: [PATCH 02/11] Update tests --- ext/data/structured-content-style.json | 18 ++++++++++---- test/data/anki-note-builder-test-results.json | 24 +++++++++---------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/ext/data/structured-content-style.json b/ext/data/structured-content-style.json index f6fdedf8a8..3c3f9152a6 100644 --- a/ext/data/structured-content-style.json +++ b/ext/data/structured-content-style.json @@ -3,6 +3,7 @@ "selectors": [".gloss-image-container"], "styles": [ ["display", "inline-block"], + ["white-space", "nowrap"], ["max-width", "100%"], ["max-height", "100vh"], ["position", "relative"], @@ -86,8 +87,17 @@ ["vertical-align", "top"], ["object-fit", "contain"], ["border", "none"], - ["outline", "none"], - ["width", "100%"] + ["outline", "none"] + ] + }, + { + "selectors": [".gloss-image-link[data-has-aspect-ratio=true] .gloss-image"], + "styles": [ + ["position", "absolute"], + ["left", "0"], + ["top", "0"], + ["width", "100%"], + ["height", "100%"] ] }, { @@ -164,11 +174,11 @@ { "selectors": [".gloss-image-link[data-appearance=monochrome] .gloss-image"], "styles": [ - ["filter", "grayscale(1)"] + ["filter", "grayscale(1) opacity(0.5) drop-shadow(0 0 0 var(--text-color)) saturate(1000%) brightness(1000%)"] ] }, { - "selectors": [".gloss-image-link:not([data-appearance=monochrome]) .gloss-image-background"], + "selectors": [".gloss-image-background"], "styles": [ ["display", "none"] ] diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index fc9cbf85b2..2637b8d559 100644 --- a/test/data/anki-note-builder-test-results.json +++ b/test/data/anki-note-builder-test-results.json @@ -863,12 +863,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", @@ -1570,12 +1570,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", From b7490132dd3baae20bf23702b904d511243adc42 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Thu, 26 Dec 2024 23:25:59 -0500 Subject: [PATCH 03/11] Update anki css and overrides --- dev/data/structured-content-overrides.css | 9 +++++++++ ext/data/structured-content-style.json | 13 ++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dev/data/structured-content-overrides.css b/dev/data/structured-content-overrides.css index 1fe72276f5..7d3db8c459 100644 --- a/dev/data/structured-content-overrides.css +++ b/dev/data/structured-content-overrides.css @@ -64,3 +64,12 @@ .gloss-sc-summary { /* remove-rule */ } +.gloss-image-background { + background-color: currentColor; +} +.gloss-image-link:not([data-appearance=monochrome]) .gloss-image-background { + display: none; +} +.gloss-image-link[data-appearance=monochrome] .gloss-image { + opacity: 0; +} diff --git a/ext/data/structured-content-style.json b/ext/data/structured-content-style.json index 3c3f9152a6..299514e805 100644 --- a/ext/data/structured-content-style.json +++ b/ext/data/structured-content-style.json @@ -67,7 +67,6 @@ ["top", "0"], ["width", "100%"], ["height", "100%"], - ["background-color", "var(--text-color)"], ["-webkit-mask-repeat", "no-repeat"], ["-webkit-mask-position", "center center"], ["-webkit-mask-mode", "alpha"], @@ -77,7 +76,8 @@ ["mask-position", "center center"], ["mask-mode", "alpha"], ["mask-size", "contain"], - ["mask-image", "var(--image)"] + ["mask-image", "var(--image)"], + ["background-color", "currentColor"] ] }, { @@ -174,7 +174,8 @@ { "selectors": [".gloss-image-link[data-appearance=monochrome] .gloss-image"], "styles": [ - ["filter", "grayscale(1) opacity(0.5) drop-shadow(0 0 0 var(--text-color)) saturate(1000%) brightness(1000%)"] + ["filter", "grayscale(1) opacity(0.5) drop-shadow(0 0 0 var(--text-color)) saturate(1000%) brightness(1000%)"], + ["opacity", "0"] ] }, { @@ -339,5 +340,11 @@ ["border-width", "1px"], ["border-color", "currentColor"] ] + }, + { + "selectors": [".gloss-image-link:not([data-appearance=monochrome]) .gloss-image-background"], + "styles": [ + ["display", "none"] + ] } ] From 91b8b86f37e0bbdafb77a5a6ffb0bf44ddde2f38 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Thu, 26 Dec 2024 23:26:03 -0500 Subject: [PATCH 04/11] Update tests --- test/data/anki-note-builder-test-results.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index 2637b8d559..beee7a8940 100644 --- a/test/data/anki-note-builder-test-results.json +++ b/test/data/anki-note-builder-test-results.json @@ -863,12 +863,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", @@ -1570,12 +1570,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", From 43fe4106dfce096bdfce198227a3b6eb1a54532c Mon Sep 17 00:00:00 2001 From: kuuuube Date: Fri, 27 Dec 2024 00:51:43 -0500 Subject: [PATCH 05/11] Fix drop shadow not rendering on firefox --- ext/css/structured-content.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/css/structured-content.css b/ext/css/structured-content.css index f966aec40d..bcbfeb4147 100644 --- a/ext/css/structured-content.css +++ b/ext/css/structured-content.css @@ -144,7 +144,8 @@ } .gloss-image-link[data-appearance=monochrome] .gloss-image { - filter: grayscale(1) opacity(0.5) drop-shadow(0 0 0 var(--text-color)) saturate(1000%) brightness(1000%); + /* drop-shadow with 0.01px blur is at minimum required for Firefox to render the shadow when used on a canvas */ + filter: grayscale(1) opacity(0.5) drop-shadow(0 0 0.01px var(--text-color)) saturate(1000%) brightness(1000%); } .gloss-image-background { display: none; From 038cff0033a2d0e7ca8053900cb62e40f31df2d4 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Fri, 27 Dec 2024 01:10:42 -0500 Subject: [PATCH 06/11] Fix anki css --- dev/data/structured-content-overrides.css | 1 + ext/css/structured-content.css | 4 +--- ext/data/structured-content-style.json | 11 +++-------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dev/data/structured-content-overrides.css b/dev/data/structured-content-overrides.css index 7d3db8c459..62939f21b4 100644 --- a/dev/data/structured-content-overrides.css +++ b/dev/data/structured-content-overrides.css @@ -66,6 +66,7 @@ } .gloss-image-background { background-color: currentColor; + display: initial; } .gloss-image-link:not([data-appearance=monochrome]) .gloss-image-background { display: none; diff --git a/ext/css/structured-content.css b/ext/css/structured-content.css index bcbfeb4147..14160d3c1f 100644 --- a/ext/css/structured-content.css +++ b/ext/css/structured-content.css @@ -86,6 +86,7 @@ mask-mode: alpha; mask-size: contain; mask-image: var(--image); + display: none; } .gloss-image { display: inline-block; @@ -147,9 +148,6 @@ /* drop-shadow with 0.01px blur is at minimum required for Firefox to render the shadow when used on a canvas */ filter: grayscale(1) opacity(0.5) drop-shadow(0 0 0.01px var(--text-color)) saturate(1000%) brightness(1000%); } -.gloss-image-background { - display: none; -} .gloss-image-link[data-size-units=em] .gloss-image-container { font-size: 1em; diff --git a/ext/data/structured-content-style.json b/ext/data/structured-content-style.json index 299514e805..c3515c0619 100644 --- a/ext/data/structured-content-style.json +++ b/ext/data/structured-content-style.json @@ -77,7 +77,8 @@ ["mask-mode", "alpha"], ["mask-size", "contain"], ["mask-image", "var(--image)"], - ["background-color", "currentColor"] + ["background-color", "currentColor"], + ["display", "initial"] ] }, { @@ -174,16 +175,10 @@ { "selectors": [".gloss-image-link[data-appearance=monochrome] .gloss-image"], "styles": [ - ["filter", "grayscale(1) opacity(0.5) drop-shadow(0 0 0 var(--text-color)) saturate(1000%) brightness(1000%)"], + ["filter", "grayscale(1) opacity(0.5) drop-shadow(0 0 0.01px var(--text-color)) saturate(1000%) brightness(1000%)"], ["opacity", "0"] ] }, - { - "selectors": [".gloss-image-background"], - "styles": [ - ["display", "none"] - ] - }, { "selectors": [".gloss-image-link[data-size-units=em] .gloss-image-container"], "styles": [ From 7c0a616d333c72196355701f9f5e3cee39d1b991 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Fri, 27 Dec 2024 01:10:47 -0500 Subject: [PATCH 07/11] Update tests --- test/data/anki-note-builder-test-results.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index beee7a8940..d40c006b14 100644 --- a/test/data/anki-note-builder-test-results.json +++ b/test/data/anki-note-builder-test-results.json @@ -863,12 +863,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", @@ -1570,12 +1570,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", From 07aaf3e58c595e5eb0cc9bd6792e1b89c6176603 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Fri, 27 Dec 2024 01:12:07 -0500 Subject: [PATCH 08/11] Use remove-property instead of overwriting property --- dev/data/structured-content-overrides.css | 2 +- ext/data/structured-content-style.json | 3 +-- test/data/anki-note-builder-test-results.json | 24 +++++++++---------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dev/data/structured-content-overrides.css b/dev/data/structured-content-overrides.css index 62939f21b4..38d8836173 100644 --- a/dev/data/structured-content-overrides.css +++ b/dev/data/structured-content-overrides.css @@ -66,7 +66,7 @@ } .gloss-image-background { background-color: currentColor; - display: initial; + /* remove-property display */ } .gloss-image-link:not([data-appearance=monochrome]) .gloss-image-background { display: none; diff --git a/ext/data/structured-content-style.json b/ext/data/structured-content-style.json index c3515c0619..de7dc1469e 100644 --- a/ext/data/structured-content-style.json +++ b/ext/data/structured-content-style.json @@ -77,8 +77,7 @@ ["mask-mode", "alpha"], ["mask-size", "contain"], ["mask-image", "var(--image)"], - ["background-color", "currentColor"], - ["display", "initial"] + ["background-color", "currentColor"] ] }, { diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index d40c006b14..8b1a1d0bea 100644 --- a/test/data/anki-note-builder-test-results.json +++ b/test/data/anki-note-builder-test-results.json @@ -863,12 +863,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", @@ -1570,12 +1570,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-brief": "
  • gazou definition 1
", - "glossary-no-dictionary": "
(n)
  • gazou definition 1
", - "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", - "glossary-first-brief": "
  • gazou definition 1
", - "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-brief": "
  • gazou definition 1
", + "glossary-no-dictionary": "
(n)
  • gazou definition 1
", + "glossary-first": "
(n, termsDictAlias)
  • gazou definition 1
", + "glossary-first-brief": "
  • gazou definition 1
", + "glossary-first-no-dictionary": "
(n)
  • gazou definition 1
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", From 1bcfdcb2da4678f68b5f9da02d47b5e3ae26e077 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Fri, 27 Dec 2024 11:08:50 -0500 Subject: [PATCH 09/11] Add shadow settings var and use second shadow --- ext/css/structured-content.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/css/structured-content.css b/ext/css/structured-content.css index 14160d3c1f..4b7cc1be10 100644 --- a/ext/css/structured-content.css +++ b/ext/css/structured-content.css @@ -146,7 +146,8 @@ .gloss-image-link[data-appearance=monochrome] .gloss-image { /* drop-shadow with 0.01px blur is at minimum required for Firefox to render the shadow when used on a canvas */ - filter: grayscale(1) opacity(0.5) drop-shadow(0 0 0.01px var(--text-color)) saturate(1000%) brightness(1000%); + --shadow-settings: 0 0 0.01px var(--text-color); + filter: grayscale(1) opacity(0.5) drop-shadow(var(--shadow-settings)) drop-shadow(var(--shadow-settings)) saturate(1000%) brightness(1000%); } .gloss-image-link[data-size-units=em] .gloss-image-container { From 96444552c9f6450ed5405f6fbd38dfe6e0c17968 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Fri, 27 Dec 2024 11:19:02 -0500 Subject: [PATCH 10/11] Add workaround note --- ext/css/structured-content.css | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/css/structured-content.css b/ext/css/structured-content.css index 4b7cc1be10..a2af2280e9 100644 --- a/ext/css/structured-content.css +++ b/ext/css/structured-content.css @@ -145,6 +145,7 @@ } .gloss-image-link[data-appearance=monochrome] .gloss-image { + /* Workaround for coloring monochrome gloss images due to issues with masking using a canvas without loading extra media */ /* drop-shadow with 0.01px blur is at minimum required for Firefox to render the shadow when used on a canvas */ --shadow-settings: 0 0 0.01px var(--text-color); filter: grayscale(1) opacity(0.5) drop-shadow(var(--shadow-settings)) drop-shadow(var(--shadow-settings)) saturate(1000%) brightness(1000%); From 5953529e17e4944272c67820ce0b7bebc10c09bb Mon Sep 17 00:00:00 2001 From: kuuuube Date: Fri, 27 Dec 2024 11:21:03 -0500 Subject: [PATCH 11/11] Update structured content json --- ext/data/structured-content-style.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/data/structured-content-style.json b/ext/data/structured-content-style.json index de7dc1469e..be30dc4961 100644 --- a/ext/data/structured-content-style.json +++ b/ext/data/structured-content-style.json @@ -174,7 +174,8 @@ { "selectors": [".gloss-image-link[data-appearance=monochrome] .gloss-image"], "styles": [ - ["filter", "grayscale(1) opacity(0.5) drop-shadow(0 0 0.01px var(--text-color)) saturate(1000%) brightness(1000%)"], + ["--shadow-settings", "0 0 0.01px var(--text-color)"], + ["filter", "grayscale(1) opacity(0.5) drop-shadow(var(--shadow-settings)) drop-shadow(var(--shadow-settings)) saturate(1000%) brightness(1000%)"], ["opacity", "0"] ] },