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

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: Update commit message Created 4 years, 8 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 * {
4 box-sizing: border-box;
5 }
6
7 .container {
8 width: 400px;
9 height: 100px;
10 background: #DDD;
11 position: relative;
12 padding: 0 10%;
mstensho (USE GERRIT) 2016/05/11 08:36:22 I don't think you need to use percents here (they
Deokjin Kim 2016/05/11 14:10:04 Done.
13 }
14
15 .item {
16 width: 100px;
17 height: 100px;
18 background: #09F;
19 left: 10%;
20 position: absolute;
21 }
22 </style>
23 <script src="../../../resources/js-test.js"></script>
24 <div class="container">
25 <div class="item">
26 </div>
27 </div>
28 <script>
29 description("Blue item box is 10% left in container. Box should display 40px a s getComputedStyle( item ).left should return 40px (400px * 10%)");
30 var item = document.querySelector('.item');
31 var computedStyle = window.getComputedStyle(item);
32 shouldBe("computedStyle.getPropertyValue('left')", "'40px'");
33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698