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

Side by Side Diff: sky/tests/layout/borderbox-percent-padding.sky

Issue 1077473002: Stop rendering text inside flex boxes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: make p default to display: paragraph Created 5 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
« no previous file with comments | « sky/tests/harness/reftest-mismatch.sky ('k') | sky/tests/layout/continuations.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <style> 1 <style>
2 border-box { 2 border-box {
3 background-color: pink; 3 background-color: pink;
4 box-sizing: border-box; 4 box-sizing: border-box;
5 max-width: 300px; 5 max-width: 300px;
6 padding: 0 5%; 6 padding: 0 5%;
7 } 7 }
8 paragraph {
9 display: paragraph;
10 }
11 </style> 8 </style>
12 <container style="width: 400px"> 9 <container style="width: 400px">
13 <border-box> 10 <border-box>
14 <paragraph>Even though the width of 'border-box' stays the same after it rea ches 300px, the width available to its children decreases as its padding continu es to expand. Because the padding is based off the width before it's constrained by min/max. This tests that we continue to layout the contents of border-box ev en when its own width remains the same.</paragraph> 11 <p>Even though the width of 'border-box' stays the same after it reaches 300 px, the width available to its children decreases as its padding continues to ex pand. Because the padding is based off the width before it's constrained by min/ max. This tests that we continue to layout the contents of border-box even when its own width remains the same.</p>
15 </div> 12 </div>
16 </container> 13 </container>
17 14
18 <script> 15 <script>
19 import "../resources/third_party/unittest/unittest.dart"; 16 import "../resources/third_party/unittest/unittest.dart";
20 import "../resources/unit.dart"; 17 import "../resources/unit.dart";
21 18
22 import "dart:sky"; 19 import "dart:sky";
23 20
24 void main() { 21 void main() {
25 initUnit(); 22 initUnit();
26 23
27 test("paragraph width should shrink", () { 24 test("paragraph width should shrink", () {
28 expect(document.querySelector("paragraph").offsetWidth, equals(260)); 25 expect(document.querySelector("p").offsetWidth, equals(260));
29 document.querySelector("container").style["width"] = "800px"; 26 document.querySelector("container").style["width"] = "800px";
30 expect(document.querySelector("paragraph").offsetWidth, equals(220)); 27 expect(document.querySelector("p").offsetWidth, equals(220));
31 }); 28 });
32 } 29 }
33 </script> 30 </script>
OLDNEW
« no previous file with comments | « sky/tests/harness/reftest-mismatch.sky ('k') | sky/tests/layout/continuations.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698