Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 .container { | |
| 4 width: 400px; | |
| 5 height: 100px; | |
| 6 background: #DDD; | |
| 7 position: relative; | |
| 8 padding: 0px 0px; | |
|
mstensho (USE GERRIT)
2016/05/12 09:34:03
That's the initial value for padding. You can just
Deokjin Kim
2016/05/12 11:24:20
Done.
| |
| 9 } | |
| 10 | |
| 11 .item { | |
| 12 width: 100px; | |
| 13 height: 100px; | |
| 14 background: #09F; | |
| 15 left: 10%; | |
| 16 position: absolute; | |
| 17 } | |
| 18 </style> | |
| 19 <script src="../../../resources/js-test.js"></script> | |
| 20 <div class="container"> | |
| 21 <div class="item"> | |
| 22 </div> | |
| 23 </div> | |
| 24 <script> | |
| 25 description("Blue item box is 10% left in container. Box should display 40px a s getComputedStyle( item ).left should return 40px (400px * 10%)"); | |
| 26 var item = document.querySelector('.item'); | |
| 27 var computedStyle = window.getComputedStyle(item); | |
| 28 shouldBe("computedStyle.getPropertyValue('left')", "'40px'"); | |
| 29 </script> | |
| OLD | NEW |