fix: restore jlpt subtitle underlines

This commit is contained in:
2026-04-26 19:21:28 -07:00
parent b10a7b3e98
commit af86ce2341
4 changed files with 106 additions and 0 deletions
+8
View File
@@ -901,6 +901,14 @@ test('subtitle annotation CSS changes token color without overriding typography'
for (let level = 1; level <= 5; level += 1) {
const plainJlptBlock = extractClassBlock(cssText, `#subtitleRoot .word.word-jlpt-n${level}`);
assert.doesNotMatch(plainJlptBlock, /(?:^|\n)\s*color\s*:/m);
assert.match(plainJlptBlock, /text-decoration-line:\s*underline;/);
assert.match(plainJlptBlock, /text-decoration-thickness:\s*2px;/);
assert.match(plainJlptBlock, /text-underline-offset:\s*4px;/);
assert.match(
plainJlptBlock,
new RegExp(`text-decoration-color:\\s*var\\(--subtitle-jlpt-n${level}-color,`),
);
assert.match(plainJlptBlock, /text-decoration-style:\s*solid;/);
const block = extractClassBlock(cssText, buildJlptColorSelector(level));
assert.ok(block.length > 0, `word-jlpt-n${level} class should exist`);