I have the below CSS:
example-element {
text-decoration: underline 35px solid rgba(0, 76, 255, 0.52);
}
I expect to get text-decoration-thickness: 35px as part of the computed styles. However, when I check the computed styles using JavaScript:
console.log(window.getComputedStyle(document.querySelector('example-element')));
I get:
...
text-decoration-color: "rgba(0, 76, 255, 0.52)"
text-decoration-line: "underline"
text-decoration-skip-ink: "auto"
text-decoration-style: "solid"
...
It doesn’t return text-decoration-thickness
as a separate property like others.
Why is text-decoration-thickness
not showing up in the computed styles, even though it’s part of the shorthand text-decoration
? It seems like a clear oversight from Chrome, as if the developers aren’t taking this seriously. Chrome should include text-decoration-thickness
in the computed styles. This is causing my system to break, and it’s unacceptable.
Any hacks to fix this issue temporary will be appreciated. Thanks.