blob: bb79a7df8d27c708e21a70a7589fbfa0422be3fb [file] [log] [blame]
<!DOCTYPE html>
<link rel="author" title="Xiaocheng Hu" href="">
<link rel="help" href="">
<link rel="match" href="rotate-by-added-angle-ref.html">
<meta name="assert" content="CSSUnitValue of different angle units can be added correctly.">
.common {
width: 200px;
height: 100px;
position: absolute;
top: 100px;
left: 100px;
.ref {
transform: rotate(90deg);
background-color: red;
.test {
background-color: green;
z-index: 1;
<p>Test passes if there is a filled green rectangle with <strong>no red</strong>.</p>
<div class="common ref"></div>
<div class="common test"></div>
const angle = new CSSMathSum(CSS.deg(45), CSS.turn(0.125)); // 90 degrees
const transform = new CSSTransformValue([new CSSRotate(angle)]);
const target = document.querySelector('.test');
target.attributeStyleMap.set('transform', transform);