This repository was archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 320
Add test for flex-grow being less than one #1106
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <!DOCTYPE html> | ||
| <meta charset="utf-8"> | ||
| <title>CSS Flexbox Test: flex-grow - less than one</title> | ||
| <link rel="author" title="Geoffrey Sneddon" href="mailto:me@gsnedders.com"> | ||
| <link rel="help" title="7.3.1. The 'flex-grow' property" href="http://www.w3.org/TR/css-flexbox-1/#propdef-flex-grow"> | ||
| <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> | ||
| <meta name="flags" content=""> | ||
| <meta name="assert" content="Test checks that remaining free space is calculated from 'flex-grow' set to positive number less than one."> | ||
| <style> | ||
| .container { | ||
| background: red; | ||
| height: 50px; | ||
| width: 100px; | ||
| } | ||
| #test1, #test2 { | ||
| display: flex; | ||
| width: 190px; | ||
| } | ||
| #test1 > div, #test2 > div { | ||
| background: green; | ||
| height: 50px; | ||
| } | ||
| #test1 > div { | ||
| flex-grow: 0.1; | ||
| width: 90px; | ||
| } | ||
| #test2 > div { | ||
| flex-grow: 0.05; | ||
| width: 45px; | ||
| } | ||
| </style> | ||
| <body> | ||
| <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
| <div class="container"> | ||
| <div id="test1"> | ||
| <div></div> | ||
| </div> | ||
| </div> | ||
| <div class="container"> | ||
| <div id="test2"> | ||
| <div></div> | ||
| <div></div> | ||
| </div> | ||
| </div> | ||
| </body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <!DOCTYPE html> | ||
| <meta charset="utf-8"> | ||
| <title>CSS Flexbox Test: flex-shrink - less than one</title> | ||
| <link rel="author" title="Geoffrey Sneddon" href="mailto:me@gsnedders.com"> | ||
| <link rel="help" title="7.3.1. The 'flex-shrink' property" href="http://www.w3.org/TR/css-flexbox-1/#propdef-flex-shrink"> | ||
| <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> | ||
| <meta name="flags" content=""> | ||
| <meta name="assert" content="Test checks that remaining free space is calculated from 'flex-shrink' set to positive number less than one."> | ||
| <style> | ||
| .container { | ||
| background: red; | ||
| height: 50px; | ||
| width: 100px; | ||
| } | ||
| #test1, #test2 { | ||
| display: flex; | ||
| width: 50px; | ||
| } | ||
| #test1 > div, #test2 > div { | ||
| background: green; | ||
| height: 50px; | ||
| } | ||
| #test1 > div { | ||
| flex-shrink: 0.9; | ||
| width: 550px; | ||
| } | ||
| #test2 > div { | ||
| flex-shrink: 0.25; | ||
| width: 75px; | ||
| } | ||
| </style> | ||
| <body> | ||
| <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
| <div class="container"> | ||
| <div id="test1"> | ||
| <div></div> | ||
| </div> | ||
| </div> | ||
| <div class="container"> | ||
| <div id="test2"> | ||
| <div></div> | ||
| <div></div> | ||
| </div> | ||
| </div> | ||
| </body> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done the maths for this three times and got three different results. (I've gone wrong in different places each time!) From the one time I got what every browser does, can someone else confirm that this doesn't run into (undefined) rounding issues?