Skip to content

Commit e34a07d

Browse files
committed
spec/css3-regions/complex-layout-example: edited
1 parent c865168 commit e34a07d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

spec/css3-regions/complex-layout-example.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,36 @@ This large example served as the motivational example in the introduction of the
22

33
=== Intro ===
44

5+
Displaying the complex layouts of a typical magazine, newspaper, or textbook on the web requires capabilities beyond those available in existing CSS modules. Dynamic magazine layout in particular requires flexibility in placement of boxes for content flows. This is one purpose of the CSS regions module.
6+
7+
Consider the layout illustrated in this figure.
8+
59
{{:spec:css3-regions:intro-example-layout.png?nolink&300|}}
610

11+
The designer’s intent is to position an image in box A and to flow an article’s content from box 1 through boxes 2, 3 and 4. Note that the second box should have two columns, and the image is not contained in the article. Box 4 should auto-size to render the remainder of the article content that did not fit in the earlier boxes.
12+
13+
The next figure shows an example of the intended visual rendering of the content.
14+
715
{{:spec:css3-regions:regions-intro-rendering.png?nolink&300|}}
816

17+
There is no existing mechanism in CSS to associate the content with these boxes arranged in this manner so that content flows as intended. The CSS regions module properties provide that mechanism.
18+
19+
The following example illustrates how an <article> element is placed in a named flow and how boxes marked with "region1", "region2", "region3" and "region4" IDs become CSS Regions that consume the "article-flow" content.
20+
21+
<code css>
22+
<style>
23+
article {
24+
flow-into: article-flow;
25+
}
26+
27+
#region1, #region2, #region3, #region4 {
28+
flow-from: article-flow;
29+
}
30+
</style>
31+
</code>
32+
33+
The "article-flow" value on the flow-into property directs the article element to the "article-flow" named flow. Setting the flow-from property on block containers to "article-flow" makes them CSS Regions and associates the resulting region chain with the named flow: the flow is "poured" into the region chain.
34+
935
=== Code ===
1036

1137
This was originally included in Appendix A with this note:

0 commit comments

Comments
 (0)