mirror of
https://github.com/servo/servo.git
synced 2025-09-05 12:38:21 +01:00
Auto merge of #10817 - danlrobertson:flex-basis, r=mbrubeck
Add style property for flex-basis Add the style property for flex-basis. The property should allow all values acceptable for `width` or `height` with the addition of `content`. I also disabled the tests that I expect to pass. I am confused by [flexbox_computedstyle-flex-basis-0percent:20](https://github.com/servo/servo/blob/master/tests/wpt/css-tests/css-flexbox-1_dev/html/flexbox_computedstyle_flex-basis-0percent.htm#L20). Should that be `0%` instead of `0px`? <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10817) <!-- Reviewable:end -->
This commit is contained in:
commit
20dd8ba7ec
8 changed files with 117 additions and 18 deletions
|
@ -5,24 +5,23 @@
|
|||
<link href="reference/ref-pass-body.htm" rel="match">
|
||||
<meta content="dom" name="flags">
|
||||
<style>
|
||||
html {
|
||||
body {
|
||||
display: flex;
|
||||
width: 100px;
|
||||
}
|
||||
body {
|
||||
div {
|
||||
color: red;
|
||||
margin: 0;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
.PASS {color: black;}
|
||||
</style>
|
||||
</head><body><h1>FAIL, enable javascript</h1>
|
||||
</head><body><div id="test"><h1>FAIL, enable javascript</h1>
|
||||
<script>
|
||||
var body = document.body;
|
||||
var test = document.getElementById("test");
|
||||
|
||||
var passed =
|
||||
getComputedStyle(body).getPropertyValue("flex-basis") ==
|
||||
getComputedStyle(test).getPropertyValue("flex-basis") ==
|
||||
"100%";
|
||||
body.textContent = body.className = passed ? "PASS" : "FAIL";
|
||||
test.textContent = test.className = passed ? "PASS" : "FAIL";
|
||||
</script>
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[flexbox_computedstyle_flex-basis-0.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[flexbox_computedstyle_flex-basis-auto.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[flexbox_computedstyle_flex-basis-percent.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue