<!doctype html>
<title>CSS Test: Dynamic text-decoration propagation</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:[email protected]">
<link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#line-decoration">
<link rel="match" href="reference/text-decoration-propagation-dynamic-001-ref.html">
<style>
div { text-decoration: none }
div.restyled { text-decoration: underline }
</style>
<div>
<span><b>Should be underlined</b></span>
</div>
<script>
document.body.offsetTop;
document.querySelector('div').classList = "restyled";
</script>