diff --git a/ext/css/structured-content.css b/ext/css/structured-content.css index a79d9ddc4..b285874f0 100644 --- a/ext/css/structured-content.css +++ b/ext/css/structured-content.css @@ -19,6 +19,8 @@ /* Glossary images */ .gloss-image-container { display: inline-block; + font-size: calc(1em / var(--font-size-no-units)); + overflow: hidden; } .gloss-image-link[data-background=true]>.gloss-image-container { background-color: var(--gloss-image-background-color); diff --git a/ext/data/structured-content-style.json b/ext/data/structured-content-style.json index 47b1e9951..caae8761b 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"], + ["overflow", "hidden"], ["font-size", "1px"] ] }, diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index 617464d3e..86e64ed13 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)
", - "glossary-brief": "
", - "glossary-no-dictionary": "
(n)
", - "glossary-first": "
(n, termsDictAlias)
", - "glossary-first-brief": "
", - "glossary-first-no-dictionary": "
(n)
", + "glossary": "
(n, termsDictAlias)
", + "glossary-brief": "
", + "glossary-no-dictionary": "
(n)
", + "glossary-first": "
(n, termsDictAlias)
", + "glossary-first-brief": "
", + "glossary-first-no-dictionary": "
(n)
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "", @@ -1570,12 +1570,12 @@ "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", - "glossary": "
(n, termsDictAlias)
", - "glossary-brief": "
", - "glossary-no-dictionary": "
(n)
", - "glossary-first": "
(n, termsDictAlias)
", - "glossary-first-brief": "
", - "glossary-first-no-dictionary": "
(n)
", + "glossary": "
(n, termsDictAlias)
", + "glossary-brief": "
", + "glossary-no-dictionary": "
(n)
", + "glossary-first": "
(n, termsDictAlias)
", + "glossary-first-brief": "
", + "glossary-first-no-dictionary": "
(n)
", "part-of-speech": "Noun", "pitch-accents": "", "pitch-accent-graphs": "",