Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-left.html

Issue 1876123002: Absolute positioned child with percent should include containing block padding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply mstensho's comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698