Skip to content

Commit fb603bc

Browse files
committed
add support for text-underline-offset. See #303
1 parent 526c4c8 commit fb603bc

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/modules/styles.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ function snapshotComputedStyleFull(style, options = {}) {
3939
val = 'none'
4040
}
4141
out[prop] = val
42+
}
43+
// Asegurar props de decoración de texto (algunos motores no las listan en la iteración)
44+
const EXTRA_TEXT_DECORATION_PROPS = [
45+
'text-decoration-line',
46+
'text-decoration-color',
47+
'text-decoration-style',
48+
'text-decoration-thickness',
49+
'text-underline-offset',
50+
'text-decoration-skip-ink'
51+
]
52+
for (const prop of EXTRA_TEXT_DECORATION_PROPS) {
53+
if (out[prop]) continue
54+
try {
55+
const v = style.getPropertyValue(prop)
56+
if (v) out[prop] = v
57+
} catch {}
4258
}
4359
if (options.embedFonts) {
4460
const EXTRA_FONT_PROPS = [

0 commit comments

Comments
 (0)