CKTIS / CSS
text-decoration-thickness — decoration line thickness
The text-decoration-thickness property sets underline, overline, and strike-through thickness, but does not enable decorations itself.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
text-decoration-thickness: auto | from-font | <length-percentage> | <line-width>;text-decoration-thickness controls lines enabled by text-decoration-line. It changes neither glyph weight nor underline offset.
The initial auto lets the browser choose. from-font uses the first available font’s metrics, falling back to auto. A length specifies thickness; a percentage refers to the used font-size.
The property is not inherited, but an ancestor’s decoration can extend across descendants. A later text-decoration shorthand resets omitted thickness to auto. The draft grammar also includes <line-width>; this does not establish support in the target browser.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Text decoration thickness</title>
<style>
p { font: 32px sans-serif; text-decoration-thickness: 4px; }
#underlined { text-decoration-line: underline; }
</style>
</head>
<body>
<p id="underlined">Underlined text</p>
<p id="plain">Text without a decoration</p>
<script>
for (const id of ['underlined', 'plain']) {
const style = getComputedStyle(document.getElementById(id));
console.log(`${id}: text-decoration-line=${style.textDecorationLine}; text-decoration-thickness=${style.textDecorationThickness}`);
}
</script>
</body>
</html>Result
underlined: text-decoration-line=underline; text-decoration-thickness=4px plain: text-decoration-line=none; text-decoration-thickness=4px
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.