-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show warning on nested flexboxes and other unsupported elements in a …
…top-level formatting context, see #320
- Loading branch information
Showing
3 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,46 @@ | ||
<rml> | ||
<head> | ||
<title>Flex - Nested flex boxes</title> | ||
<link type="text/rcss" href="../style.rcss"/> | ||
<link rel="match" href="reference/flex_nested-ref.rml"/> | ||
<link rel="GitHub issue #320" href="https://github.com/mikke89/RmlUi/issues/320" /> | ||
<meta name="Description" content="Flex items should support flex layout." /> | ||
<meta name="Assert" content="All items should be located on a single line, and there should be no holes between them." /> | ||
<style> | ||
#window | ||
{ | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden auto; | ||
flex-direction: row; | ||
justify-content: center; | ||
flex-wrap: nowrap; | ||
} | ||
.content | ||
{ | ||
display: flex; | ||
height: 128px; | ||
width: 40%; | ||
text-align: center; | ||
flex-direction: row; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="window"> | ||
<div class="content"> | ||
<div style="width: 20%; background: red;">1</div> | ||
<div style="width: 60%; background: green;">2</div> | ||
<div style="width: 20%; background: blue;">3</div> | ||
</div> | ||
<div class="content"> | ||
<div style="width: 20%; background: red;">1</div> | ||
<div style="width: 60%; background: green;">2</div> | ||
<div style="width: 20%; background: blue;">3</div> | ||
</div> | ||
</div> | ||
<handle size_target="#document"/> | ||
</body> | ||
</rml> |
This file contains 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,47 @@ | ||
<rml> | ||
<head> | ||
<title>Flex 05 ref</title> | ||
<link type="text/rcss" href="../../style.rcss"/> | ||
<meta name="Reference" content="Reference implemented by wrapping the nested flex box in an extra div." /> | ||
<style> | ||
#window { | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden auto; | ||
flex-direction: row; | ||
justify-content: center; | ||
flex-wrap: nowrap; | ||
} | ||
.column { | ||
width: 40%; | ||
} | ||
.content { | ||
display: flex; | ||
height: 128px; | ||
text-align: center; | ||
flex-direction: row; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="window"> | ||
<div class="column"> | ||
<div class="content"> | ||
<div style="width: 20%; background: red;">1</div> | ||
<div style="width: 60%; background: green;">2</div> | ||
<div style="width: 20%; background: blue;">3</div> | ||
</div> | ||
</div> | ||
<div class="column"> | ||
<div class="content"> | ||
<div style="width: 20%; background: red;">1</div> | ||
<div style="width: 60%; background: green;">2</div> | ||
<div style="width: 20%; background: blue;">3</div> | ||
</div> | ||
</div> | ||
</div> | ||
<handle size_target="#document"/> | ||
</body> | ||
</rml> |