| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title> CSS Values and Units Test: Attribute references (number type) invalidation </title> |
| <link rel="help" href="http://www.w3.org/TR/css3-values/#attr-notation"> |
| <link rel="author" title="Suraj Thanugundla" href="mailto:contact@surajt.com"> |
| <link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> |
| <style> |
| #container { |
| height: 100px; |
| width: 100px; |
| background: red; |
| columns: attr(data-foo number); |
| column-gap: 0; |
| } |
| #inner { |
| height: 200px; |
| width: 50px; |
| background: green; |
| } |
| </style> |
| <p>Test passes if there is a filled green square.</p> |
| <div id="container" data-foo="3"> |
| <div id="inner"></div> |
| </div> |
| <script> |
| const element = document.getElementById("container"); |
| element.getBoundingClientRect(); |
| element.setAttribute("data-foo", "2"); |
| </script> |