chromium/third_party/blink/web_tests/external/wpt/css/css-typed-om/width-by-clamp-px-em.html

<!DOCTYPE html>
<link rel="author" title="Joonghun Park" href="mailto:[email protected]">
<link rel="help" href="https://www.w3.org/TR/css-typed-om-1/#stylevalue-subclasses">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="'width' can be set with a CSSMathClamp object.">
<style>
#target { font-size: 10px; background-color: green; height: 100px; }
</style>
<p>Test passes if there is a filled green square.</p>
<div id=target></div>
<script>
const width = new CSSMathClamp(CSS.px(90), CSS.em(10), CSS.px(110));
const target = document.querySelector('#target');
target.attributeStyleMap.set('width', width);
</script>