Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Lists: getComputedStyle().counterIncrement</title>
<meta name="assert" content="tests that counter-increment grammar is supported.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<style>
#container {
container-type: inline-size;
width: 100px;
}
</style>
</head>
<body>
<div id="container">
<div id="target"></div>
</div>
<script>
test_computed_value('counter-increment', 'none');
test_computed_value('counter-increment', 'myCounter', 'myCounter 1');
test_computed_value('counter-increment', 'myCounter 5');
test_computed_value('counter-increment', 'myCounter 7 otherCounter 8');
test_computed_value('counter-increment', 'myCounter otherCounter -8', 'myCounter 1 otherCounter -8');
test_computed_value('counter-increment', 'myCounter 7 otherCounter', 'myCounter 7 otherCounter 1');
test_computed_value('counter-increment', 'myCounter calc(10 + (sign(2cqw - 10px) * 5))', 'myCounter 5');
test_computed_value('counter-increment', 'myCounter calc(10 + (sign(2cqw - 10px) * 10)) otherCounter calc(15 + (sign(2cqw - 10px) * 5))', 'myCounter 0 otherCounter 10');
</script>
</body>
</html>