text-underline-offset-ref.html (536B)
1 <!DOCTYPE html> 2 <title>CSS zoom applies to text-underline-offset when specified and inherited</title> 3 <link rel="author" title="Stefan Zager" href="mailto:szager@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-viewport/"> 5 6 <style> 7 body { 8 --scale: 1; 9 } 10 div { 11 font-size: calc(1rem * var(--scale)); 12 text-decoration: underline hotpink; 13 text-underline-offset: calc(5px * var(--scale)); 14 } 15 .zoom { 16 --scale: 2; 17 } 18 </style> 19 20 <div>unzoomed</div> 21 <div class="zoom">zoomed</div> 22 <div class="zoom">zoomed inherited</div>