-
Notifications
You must be signed in to change notification settings - Fork 708
/
Copy pathintro-example.html
160 lines (143 loc) · 4.08 KB
/
intro-example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<html>
<head>
<style>
body{
font-family:"Georgia", serif;
width: 640px;
margin-left: auto;
margin-right: auto;
}
p {
margin-top: 22px;
}
#region1 {
max-height: 66px;
padding: 0px;
}
#region2 {
height: 60px;
width: 100%;
border-collapse: collapse;
margin-top: 22px;
margin-bottom: 22px;
}
tr td {
margin: 0px;
padding: 0px;
}
#region2-1, #region2-2 {
width: 100%;
height: 100%;
box-sizing: content;
}
.gutter {
width: 20px;
padding: 0px;
}
#region3 {
width: 200px;
height: 100%;
}
#region4 {
padding-top: 1em;
width: 100%;
}
#region1, #region2-1, #region2-2, #region3, #region4 {
-webkit-flow-from: article;
}
#multi-col {
-webkit-column-count: 2;
height: 6em;
}
#regular-div {
width: 100%;
height: auto;
margin-top: 2em;
}
#article {
-webkit-flow-into: article;
color:#777;
font-size: 18px;
line-height: 22px;
font-weight: normal;
text-align: justify;
}
#article > h1#intro {
color: crimson;
display: run-in;
font-size: 16px;
line-height: 22px;
padding-right: 14px;
}
#article > h2 {
color: #777;
font-weight: bold;
font-size: 16px;
line-height: 22px;
border-left: 1px solid #777;
padding-left: 2ex;
}
#article .fake-region-style {
/*color: #0C3D5F;
font-weight: bold;*/
}
</style>
</head>
<body>
<div id="article">
<h1 id="intro">Introduction</h1>
<p style="margin-top:0">
<span class="fake-region-style">This is an example that shows how content
can be made to flow between multiple regions. The image is
displayed in</span> box 'A'. The 'article' is flowed from
region '1', to region '2', to region '3' and finally to region
'4'. Note how the content that is laid out in 'region 1' can be
subject to a different style.
</p>
<h2 id="more">More Details</h2>
<p>
This illustrates some of the features of CSS Regions. First,
the ability to associate a flow of content to a set of
regions and effectively getting that content to be threaded
from one region to the next.
</p>
</p>
Then, the example illustrates the concept of 'region styling',
where the content that falls into a specific region is subject
to additional style rule, in the same spirit as inline content
falling in the 'first line' can be subject to additional styling
as defined by the ::first-line pseudo element selector.
</p>
<p>
Finally, this initial example shows that the concept of region
is orthogonal to the layout of regions. This means that regions
can be created and positioned using existing CSS and HTML
layout (such as multi-column, flex box or grid layout).
The CSS Regions specification defines how these regions can
be the recipients of a 'named flow'.
</p>
</div>
<!-- Using table in lieu of grid because there is not grid support -->
<!-- in browser used for demonstrating the feature yet. -->
<table id="table-grid">
<tr>
<td>
<div id="region1"></div>
<table id="region2">
<tr>
<td><div id="region2-1"></div></td>
<td class="gutter"></td>
<td><div id="region2-2"></div></td>
</tr>
</table>
<div id="regionA"><img src="intro-example-image.png" width="420"/></div>
</td>
<td class="gutter"></td>
<td>
<div id="region3"></div>
</td>
</tr>
</table>
<div id="region4"></div>
</body>
</html>