1111 rel =dcterms.rights >
1212 < meta content ="CSS Template Layout Module " name =dcterms.title >
1313 < meta content =text name =dcterms.type >
14- < meta content =2015-03-20 name =dcterms.date >
14+ < meta content =2015-03-24 name =dcterms.date >
1515 < meta content ="Bert Bos " name =dcterms.creator >
1616 < meta content ="César Acebal " name =dcterms.creator >
1717 < meta content =W3C name =dcterms.publisher >
4141
4242 < h1 class =p-name > CSS Template Layout Module</ h1 >
4343
44- < h2 class ="no-num no-toc "> Editor's Draft 20 March 2015</ h2 >
44+ < h2 class ="no-num no-toc "> Editor's Draft 24 March 2015</ h2 >
4545
4646 < dl >
4747 < dt > This version:
@@ -92,7 +92,7 @@ <h2 class="no-num no-toc">Editor's Draft 20 March 2015</h2>
9292 href ="http://www.ercim.eu/ "> < abbr
9393 title ="European Research Consortium for Informatics and Mathematics "> ERCIM</ abbr > </ a > ,
9494 < a href ="http://www.keio.ac.jp/ "> Keio</ a > , < a
95- href ="http://ev.buaa.edu.cn/ "> Beihang</ a > ), All Rights Reserved . W3C < a
95+ href ="http://ev.buaa.edu.cn/ "> Beihang</ a > ). W3C < a
9696 href ="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer "> liability</ a > ,
9797 < a
9898 href ="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks "> trademark</ a >
@@ -119,37 +119,27 @@ <h2 class="no-num no-toc" id=abstract>Abstract</h2>
119119 contains experimental ideas for < em > layout templates</ em > and alternative
120120 layout models in CSS.
121121
122- < p > At the moment, this module defines a < em > typographic grid</ em > for CSS.
123- It has features to set up a grid-based template and to flow content into
124- it.
122+ < p > At the moment, it defines a < em > typographic grid</ em > for CSS. It has
123+ features to set up a grid-based template, to style the < a
124+ href ="#slot "> < em > slots</ em > </ a > of the template and to flow content into
125+ them.
125126
126- < p > A grid template can be seen as a cross between table layout (aligning
127- & sizing blocks of text automatically in a two-dimensional grid) and
128- absolute positioning (making visual order of content independent of source
129- document order), but it also has unique features of its own.
130-
131- < p > The ‘< a href ="#grid "> < code class =property > grid</ code > </ a > ’ property
132- sets up a matrix of rows and columns and uses it to define areas that
133- accept content (called “slotsâ€). The ‘< a href ="#flow0 "> < code
134- class =property > flow</ code > </ a > ’ property then specifies into which slot
135- an element flows. The < a href ="#slot-pseudo-element. "> ‘< code
136- class =css > ::slot()</ code > ’ pseudo-element</ a > allows to style the slots
137- (backgrounds, borders, etc.)
127+ < p > A grid template can be seen as a cross between table layout (align
128+ blocks of text automatically in two-dimensions) and absolute positioning
129+ (position elements in arbitrary order), but it also has unique features of
130+ its own.
138131
139132 < p > Grid templates can also be associated with pages in paged media (via
140133 ‘< code class =css > @page</ code > ’), to create < em > page templates.</ em >
141134
142- < p > Slots can form “chains†to create non-rectangular regions. A chain
143- of slots is like a series of pages or columns: content is distributed over
144- the slots by breaking it at possible break points (see the ‘< code
145- class =css > break-*</ code > ’ properties from < a href ="#ref-CSS3-BREAK "
146- rel =biblioentry > [CSS3-BREAK]<!--{{CSS3-BREAK}}--> </ a > ).
147-
148- < p > Templates can make use of the ‘< a href ="#atregion "> < code
149- class =css > @region</ code > </ a > ’ rule < a href ="#ref-CSS-REGIONS-1 "
150- rel =biblioentry > [CSS-REGIONS-1]<!--{{!CSS-REGIONS-1}}--> </ a > for selectors
151- to style the contents of slots (< a
152- href ="#region-based-styling "> < em > region-based styling</ em > </ a > ).
135+ < p > Slots can form < a href ="#chains0 "> < em > chains,</ em > </ a > to create
136+ non-rectangular regions. A chain of slots is like a series of small pages:
137+ content is broken at possible page breaks and distributed over the slots.
138+
139+ < p > < a href ="#region-based-styling "> < em > Region-based styling</ em > </ a > allows
140+ content to be styled not only based on its position in the document tree,
141+ but also based on the slot it finds itself in. This is achieved by
142+ allowing slot names to appear in selectors.
153143 <!--=================================================================-->
154144
155145 < h2 class ="no-num no-toc " id =status > Status of this document</ h2 >
@@ -1042,9 +1032,9 @@ <h3 id=dependencies><span class=secno>1.2. </span>Dependencies on other
10421032
10431033 < li > < cite > CSS values and Units module</ cite > < a href ="#ref-CSS3VAL "
10441034 rel =biblioentry > [CSS3VAL]<!--{{!CSS3VAL}}--> </ a > – < a
1045- href ="/TR/css3-values#strings "> < dfn
1035+ href ="http://www.w3.org /TR/css3-values#strings "> < dfn
10461036 id =ltstringgt > < var > <string></ var > </ dfn > </ a > and < a
1047- href ="/TR/css3-values#length-value "> < dfn
1037+ href ="http://www.w3.org /TR/css3-values#length-value "> < dfn
10481038 id =ltlengthgt > < var > <length></ var > </ dfn > </ a > .
10491039
10501040 < li > < cite > CSS box module</ cite > < a href ="#ref-CSS3BOX "
@@ -1590,8 +1580,8 @@ <h3 id=grid-column-sizes><span class=secno>3.2. </span>Specifying the
15901580 < dt > < var > <fraction></ var >
15911581
15921582 < dd > (A non-negative number followed by ‘< code class =css > fr</ code > ’.)
1593- A fraction of the remaining space, see < a
1594- href =" #fraction-values-fr " > Fraction values </ a > below.
1583+ A fraction of the remaining space. ‘ < code class = css > 1fr </ code > ’ means
1584+ the same as ‘ < code class = css > * </ code > ’
15951585
15961586 < dt > *
15971587
@@ -1733,8 +1723,8 @@ <h3 id=grid-template-row-sizes><span class=secno>3.3. </span>Specifying the
17331723 < dt > < var > <fraction></ var >
17341724
17351725 < dd > (A non-negative number followed by ‘< code class =css > fr</ code > ’.)
1736- A fraction of the remaining space, see < a
1737- href =" #fraction-values-fr " > Fraction values </ a > below.
1726+ A fraction of the remaining space. ‘ < code class = css > 1fr </ code > ’ means
1727+ the same as ‘ < code class = css > * </ code > ’
17381728
17391729 < dt > * (asterisk)
17401730
@@ -2118,10 +2108,9 @@ <h3 id=slot-sizes><span class=secno>3.7. </span>Calculating the size of the
21182108 class =property > margin-left</ code > </ a > ’, ‘< a
21192109 href ="#margin-right "> < code class =property > margin-right</ code > </ a > ’,
21202110 ‘< code class =property > padding-left</ code > ’ etc., that is set on it
2121- by means of the < a href ="#slot-pseudo-element. "> ‘< code
2122- class =css > ::slot()</ code > ’ pseudo-element</ a > ). Any ‘< code
2123- class =css > auto</ code > ’ margins are counted as 0 for this purpose.
2124- < span class =note > (Note that < a
2111+ by means of the < span > ‘< code class =css > ::slot()</ code > ’
2112+ pseudo-element</ span > ). Any ‘< code class =css > auto</ code > ’ margins
2113+ are counted as 0 for this purpose. < span class =note > (Note that < a
21252114 href ="#ltlengthgt "> < var > <length></ var > </ a > values can be
21262115 specified with ‘< code class =css > calc()</ code > ’ as well, see
21272116 [CSS3VALUES]].)</ span >
@@ -2518,11 +2507,11 @@ <h3 id=slot-sizes><span class=secno>3.7. </span>Calculating the size of the
25182507
25192508 < p > An extra step may be necessary in paged media if a page break occurs
25202509 inside a template (only in the case of an < a
2521- href ="#element-based-template. "> < em > element-based template, </ em > </ a > see
2522- < a href ="#element-based- page-break "> below</ a > ). If the template, after
2523- computing the width and height, is too big to fit on the current page, and
2524- if a suitable break point exists, the part of the template after that
2525- break point is put on the next page. The width of the < span class =index
2510+ href ="#element-based-template. "> < em > element-based template</ em > </ a > see < a
2511+ href ="#page-break "> below</ a > ). If the template, after computing the width
2512+ and height, is too big to fit on the current page, and if a suitable break
2513+ point exists, the part of the template after that break point is put on
2514+ the next page. The width of the < span class =index
25262515 id =containing-block > containing block</ span > on that page may be different
25272516 if that page has different margins from the current page (see < a
25282517 href ="#ref-CSS3PAGE " rel =biblioentry > [CSS3PAGE]<!--{{!CSS3PAGE}}--> </ a > )
@@ -3055,9 +3044,9 @@ <h2 id=flow><span class=secno>4. </span>Flowing content into slots: ‘<a
30553044 documentation by Andrew Fedoniouk and Ivan Goroun.</ a > E.g., < code > <ul
30563045 style="grid: '2 1'"> <li> one <li> two </ul> </ code > puts “two”
30573046 on the left and “one” on the right. It is thus also a shortcut for
3058- some applications of < a
3059- href ="http://www.w3.org/TR/css3-flexbox/#flex- order " > ‘ < code
3060- class =property > flex- order</ code > ’ .</ a >
3047+ some applications Flexbox's of < a
3048+ href ="http://www.w3.org/TR/css3-flexbox/#order-property " > ‘ < code
3049+ class =property > order</ code > ’ property .</ a >
30613050 <!--=================================================================-->
30623051
30633052 < h2 id =absolute > < span class =secno > 5. </ span > Comparison with ‘< code
@@ -3104,8 +3093,9 @@ <h3 id=slot-pseudo><span class=secno>6.1. </span>The ‘<code
31043093 class =css > ::slot()</ code > ’ pseudo-element</ h3 >
31053094
31063095 < p > The slots of a < a href ="#grid-element. "> < em > grid element</ em > </ a > can be
3107- individually addressed with the < dfn id =slot-pseudo-element. > ‘< code
3108- class =css > slot()</ code > ’ pseudo-element.</ dfn >
3096+ individually addressed with the < dfn id =slot-pseudo-element.
3097+ title ="slot!!pseudo-element "> ‘< code class =css > slot()</ code > ’
3098+ pseudo-element.</ dfn >
31093099
31103100 < div class =example >
31113101 < p > For example, the following sets the background and vertical alignment
@@ -3241,15 +3231,15 @@ <h3 id=the-blank-pseudo-element><span class=secno>6.2. </span>The ‘<code
32413231 ‘< code class =css > ::slot(a):empty</ code > ’ and ‘< code
32423232 class =css > :slot(a):blank' are invalid syntax… </ code >
32433233
3244- < p > The < dfn id =blank-pseudo-element > 'blank()' pseudo-element </ dfn > selects
3245- named slots that have no content flowed into them. ’::slot(a)‘ < code
3246- class =css > and </ code > ’ ::blank(a)‘ < code class = css > select the same
3247- slot, but the latter matches only if the slot has no content flowed into
3248- it. Whether </ code > ’ ::blank()‘ < code class = css > matches is independent
3249- of the slot's 'content' property. (In other words: a “blank†slot is
3250- not necessarily empty and a slot that looks empty is not necessarily
3251- “blank,†although that is usually the case, given the initial value of
3252- 'content'.) </ code >
3234+ < p > The < dfn id =blank-pseudo-element title =" blank!!pseudo-element " > 'blank()'
3235+ pseudo-element </ dfn > selects named slots that have no content flowed into
3236+ them. ’::slot(a)‘ < code class =css > and </ code > ’ ::blank(a)‘ < code
3237+ class = css > select the same slot, but the latter matches only if the slot
3238+ has no content flowed into it. Whether </ code > ’ ::blank()‘ < code
3239+ class = css > matches is independent of the slot's 'content' property. (In
3240+ other words: a “blank” slot is not necessarily empty and a slot that
3241+ looks empty is not necessarily “blank,” although that is usually the
3242+ case, given the initial value of 'content'.) </ code >
32533243
32543244 < div class =exmaple >
32553245 < p > For example, slots a, b and c in the following document are blank, but
@@ -3429,7 +3419,7 @@ <h2 id=region-based><span class=secno>7. </span>Styling the contents of
34293419 < p > In CSS level 2, pseudo-elements could only occur at the end of a
34303420 selector. Thus an attempt to select ‘< code class =css > P::first-line
34313421 EM</ code > ’ fails. That restriction does not apply to the < a class =index
3432- href ="#slot-pseudo-element. " id =" âslotâ- pseudo-element "> ‘ < code
3422+ href ="#slot-pseudo-element. " id =s1 title =" slot!! pseudo-element "> ‘ < code
34333423 class =css > ::slot()</ code > ’ pseudo-element,</ a > as shown in the example
34343424 above.
34353425
@@ -3949,9 +3939,10 @@ <h2 id=page-templates><span class=secno>9. </span>Page-based grid templates</h2>
39493939 property on slots.
39503940 </ div >
39513941
3952- < p > The syntax of a page-based template is the same as that of an
3953- element-based one, but the declaration appears in an ‘< code
3954- class =css > @page</ code > ’ rule.
3942+ < p > The syntax of a page-based template is the same as that of an < a
3943+ href ="#element-based-template. "
3944+ title ="element-based template "> element-based one,</ a > but the declaration
3945+ appears in an ‘< code class =css > @page</ code > ’ rule.
39553946
39563947 < p > In a page-based template, the height and width are typically known
39573948 (defined by the output media and the margin boxes, see < a
@@ -5570,13 +5561,10 @@ <h3 class=no-ref id=testing> Non-experimental implementations</h3>
55705561 < h2 id =changes > < span class =secno > 13. </ span > Changes</ h2 >
55715562
55725563 < p > Summary of major changes since the < a
5573- href ="/TR/2011/WD-css3-layout-20111129/ "> 29Â November 2011 draft:</ a >
5564+ href ="http://www.w3.org/TR/2011/WD-css3-layout-20111129/ "> 29 November
5565+ 2011 draft:</ a >
55745566
55755567 < ul >
5576- < li > Short rows in a template aren't automatically padded with ‘< code
5577- class =css > .</ code > ’, but make the template illegal.
5578- <!-- WG decision 11 Apr 2012 -->
5579-
55805568 < li > Added a < a href ="#accessibility "> note about accessibility.</ a >
55815569
55825570 < li > Instead of directly on ‘< a href ="#display0 "> < code
@@ -5646,9 +5634,8 @@ <h2 id=changes><span class=secno>13. </span>Changes</h2>
56465634 class =property > vertical-align</ code > </ a > ’ to apply to all writing
56475635 modes.
56485636
5649- < li > Added the < a href ="#blank-pseudo-element "> < em > blank()
5650- pseudo-element</ em > </ a > to be able to select and style slots that, for
5651- whatever reason, have nothing flowed into them.
5637+ < li > Added the < em > blank() pseudo-element</ em > to be able to select and
5638+ style slots that, for whatever reason, have nothing flowed into them.
56525639
56535640 < li > Added a placeholder section for a stack-of-cards layout model.
56545641
@@ -5663,29 +5650,28 @@ <h2 id=changes><span class=secno>13. </span>Changes</h2>
56635650 < h2 class =no-num id =acknowledgments > Acknowledgments</ h2 >
56645651
56655652 < p > The first ideas for describing a template in CSS date from 1996 and are
5666- described in < a href ="/ TR/NOTE-layout "> < cite > Frame-based layout via Style
5667- Sheets</ cite > </ a > by Bert Bos, Dave Raggett and HÃ¥kon Wium Lie. The idea
5668- was revived in 2005 on the request of W3C's Device Independence Working
5669- Group and benefited especially from discussions with Rhys Lewis and Rotan
5670- Hanrahan from that group.
5653+ described in < a href ="http://www.w3.org/ TR/NOTE-layout "> < cite > Frame-based
5654+ layout via Style Sheets</ cite > </ a > by Bert Bos, Dave Raggett and Håkon
5655+ Wium Lie. The idea was revived in 2005 on the request of W3C's Device
5656+ Independence Working Group and benefited especially from discussions with
5657+ Rhys Lewis and Rotan Hanrahan from that group.
56715658
56725659 < p > This specification was further influenced by ideas about form layout by
56735660 < a
56745661 href ="https://lists.w3.org/Archives/Member/w3c-css-wg/2002JulSep/0077.html ">
56755662 Dave Raggett [member-only link]</ a > and an early write-up of the features
5676- of < a href ="http://www.mozilla.org/projects/xul/xul.html "> XUL</ a > by < a
5663+ of < a href ="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL ">
5664+ XUL</ a > by < a
56775665 href ="https://lists.w3.org/Archives/Member/w3c-css-wg/2002JanMar/0432.html ">
56785666 Ian Hickson [member-only link].</ a >
56795667
5680- < p > < a href ="http://transcendingcss.com/support/ "> Andy Clarke,</ a > < a
5668+ < p > < a href ="http://stuffandnonsense.co.uk/about "> Andy Clarke,</ a > < a
56815669 href ="http://sushiandrobots.com/about "> Jina Bolton</ a > and < a
56825670 href ="http://lawver.net/ "> Kevin Lawver</ a > provided use cases, examples
56835671 and requirements. The analysis in the < a href ="#history "> History</ a >
56845672 section is a slightly shortened version of work by Steve Zilles.
56855673
5686- < p > César Acebal built the first < a
5687- href ="http://transcendingcss.com/support/almcss.zip "> prototype,</ a > see
5688- < a href ="#ref-ACEBAL2012 "
5674+ < p > César Acebal built the first prototype, see < a href ="#ref-ACEBAL2012 "
56895675 rel =biblioentry > [ACEBAL2012]<!--{{ACEBAL2012}}--> </ a > . Andrew Fedoniouk
56905676 built < a
56915677 href ="http://lists.w3.org/Archives/Public/www-style/2009Mar/0278.html "> the
@@ -6004,12 +5990,6 @@ <h2 class=no-num id=index>Index</h2>
60045990 <!--begin-index-->
60055991
60065992 < ul class =indexlist >
6007- < li > ‘< code class =css > </ code >
6008- < ul >
6009- < li > slot()’ pseudo-element,, < a href ="#âslotâ-pseudo-element "
6010- title ="section 7. "> 7.</ a >
6011- </ ul >
6012-
60135993 < li > A edge, < a href ="#a-edge "
60145994 title ="section 8.1. "> < strong > 8.1.</ strong > </ a >
60155995
@@ -6028,8 +6008,11 @@ <h2 class=no-num id=index>Index</h2>
60286008 < li > background-size, < a href ="#background-size "
60296009 title ="section 1.2. "> < strong > 1.2.</ strong > </ a >
60306010
6031- < li > 'blank()' pseudo-element, < a href ="#blank-pseudo-element "
6032- title ="section 6.2. "> < strong > 6.2.</ strong > </ a >
6011+ < li > blank
6012+ < ul >
6013+ < li > pseudo-element, < a href ="#blank-pseudo-element "
6014+ title ="section 6.2. "> < strong > 6.2.</ strong > </ a >
6015+ </ ul >
60336016
60346017 < li > block container,, < a href ="#block-container "
60356018 title ="section 1.2. "> < strong > 1.2.</ strong > </ a >
@@ -6266,10 +6249,11 @@ <h2 class=no-num id=index>Index</h2>
62666249 title ="section 3.3. "> < strong > 3.3.</ strong > </ a >
62676250
62686251 < li > slot, < a href ="#slot " title ="section 3.1. "> < strong > 3.1.</ strong > </ a >
6269-
6270- < li > ‘< code class =css > slot()</ code > ’ pseudo-element., < a
6271- href ="#slot-pseudo-element. "
6272- title ="section 6.1. "> < strong > 6.1.</ strong > </ a >
6252+ < ul >
6253+ < li > pseudo-element, < a href ="#s1 " title ="section 7. "> 7.</ a > , < a
6254+ href ="#slot-pseudo-element. "
6255+ title ="section 6.1. "> < strong > 6.1.</ strong > </ a >
6256+ </ ul >
62736257
62746258 < li > slots., < a href ="#slots. " title ="section 7. "> 7.</ a >
62756259
0 commit comments