Skip to content

Commit 018d20b

Browse files
committed
adding section on exclusion
1 parent cc84d8d commit 018d20b

1 file changed

Lines changed: 104 additions & 35 deletions

File tree

css3-gcpm/Overview.src.html

Lines changed: 104 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,9 +2740,9 @@ <h3>Floating inside and outside pages</h3>
27402740
</div>
27412741

27422742

2743-
<h2>Intrusion</h2>
2743+
<h2>Exclusion</h2>
27442744

2745-
<h3>Column intrusion</h3>
2745+
<h3>Exclusion based on floats</h3>
27462746

27472747
<p>A new value on 'float' is introduced to support intrusion in columns:
27482748

@@ -2814,9 +2814,18 @@ <h3>The 'float-offset' property</h3>
28142814
in the same direction as it has been floated with 'float'
28152815

28162816
<p>This property may move floats into other column than where they
2817-
naturally appear. However, the float will never be pushed outside the
2818-
content edges of the multicol element due to a settings on this
2819-
property.
2817+
naturally appear.
2818+
2819+
<div class=example>
2820+
<pre>img {
2821+
float: right;
2822+
float-offset: 5px;
2823+
}
2824+
</pre>
2825+
2826+
<img alt="sample rendering" src=14.png>
2827+
2828+
</div>
28202829

28212830
<p>Percentage values are computed according to this formula:
28222831

@@ -2826,10 +2835,31 @@ <h3>The 'float-offset' property</h3>
28262835
</pre>
28272836

28282837

2838+
<div class=example>
2839+
Pull quotes are often centered in a column. In this example, the pull quote is floated to the right, and then pushed back into the center.
2840+
2841+
<img width=213 src="exclusion_wrap_side_left.png">
2842+
2843+
<pre>
2844+
.pullquote {
2845+
float: right;
2846+
float-offset: 50%; /* 50% centers the box */
2847+
}
2848+
</pre>
2849+
2850+
</div>
2851+
2852+
2853+
<p>When negative values are set on this property, the column gap is also part of the calculation:
2854+
2855+
<pre>
2856+
((containing-block-width + 2 * column-gap) - float-width) * percentage
2857+
</pre>
2858+
28292859
<div class=example>
28302860
<pre>img {
28312861
float: top right;
2832-
float-offset: -50% 3em;
2862+
float-offset: -50% 3em; /* 50% centers the box */
28332863
width: 120%;
28342864
}
28352865
</pre>
@@ -2853,8 +2883,6 @@ <h3>The 'float-offset' property</h3>
28532883

28542884
</div>
28552885

2856-
<p class=issue>Would it make more sense to not specify the opposite direction, but the "forward" direction?
2857-
28582886

28592887
<h3>The 'clear-side' property</h3>
28602888

@@ -2900,7 +2928,7 @@ <h3>The 'clear-side' property</h3>
29002928
<dd>there may be content on either side of the float
29012929
</dl>
29022930

2903-
2931+
<!--
29042932
<h3>Pull-quotes</h3>
29052933
29062934
<div class=example>
@@ -2916,24 +2944,11 @@ <h3>Pull-quotes</h3>
29162944
<pre>
29172945
.pullquote {
29182946
float: right;
2919-
float-offset: center;
2947+
float-offset: 50%;
29202948
}
29212949
</pre>
29222950
2923-
<pre>
2924-
.pullquote {
2925-
float: center;
2926-
clear-side: right;
2927-
}
2928-
</pre>
29292951
2930-
<pre>
2931-
.pullquote {
2932-
float: positioned;
2933-
right: 5em;
2934-
clear-side: right;
2935-
}
2936-
</pre>
29372952
</div>
29382953
29392954
<div class=example>
@@ -2949,7 +2964,7 @@ <h3>Pull-quotes</h3>
29492964
<pre>
29502965
.pullquote {
29512966
float: left;
2952-
float-offset: 50%; /* center */
2967+
float-offset: 50%;
29532968
}
29542969
</pre>
29552970
@@ -2960,14 +2975,6 @@ <h3>Pull-quotes</h3>
29602975
}
29612976
</pre>
29622977
2963-
<pre>
2964-
.pullquote {
2965-
float: positioned;
2966-
left: 5em;
2967-
clear-side: left;
2968-
}
2969-
</pre>
2970-
29712978
</div>
29722979
29732980
<pre>
@@ -2977,17 +2984,19 @@ <h3>Pull-quotes</h3>
29772984
}
29782985
</pre>
29792986
2980-
2987+
-->
29812988

29822989
<div class=example>
29832990
<img width=213 src="exclusion_wrap_side_both.png">
29842991

2992+
<!--
29852993
<pre>
29862994
.pullquote {
29872995
float: center;
29882996
clear-side: none;
29892997
}
29902998
</pre>
2999+
-->
29913000

29923001
<pre>
29933002
.pullquote {
@@ -2997,6 +3006,7 @@ <h3>Pull-quotes</h3>
29973006
}
29983007
</pre>
29993008

3009+
<!--
30003010
<pre>
30013011
.pullquote {
30023012
float: positioned;
@@ -3010,9 +3020,67 @@ <h3>Pull-quotes</h3>
30103020
float: center;
30113021
}
30123022
</pre>
3023+
-->
3024+
3025+
</div>
3026+
3027+
3028+
<h3>Exclusions based on images</h3>
3029+
3030+
<div class=example>
3031+
<img src=car1.jpg>
3032+
<pre>
3033+
article {
3034+
padding: 4em;
3035+
columns: 15em;
3036+
background: url(nicecar.jpg);
3037+
exclude-threshold: 0.5;
3038+
}
3039+
article h1 { column-span: all } /* Bonneville Speedway */
3040+
</pre>
30133041

3042+
3043+
</div>
3044+
3045+
<div class=example>
3046+
<img src=car1.jpg>
3047+
<pre>
3048+
article {
3049+
padding: 4em;
3050+
columns: 6em;
3051+
background: url(nicecar.jpg);
3052+
exclude-threshold: 0.5;
3053+
}
3054+
article h1 { column-span: all } /* Bonneville Speedway */
3055+
</pre>
3056+
</div>
3057+
3058+
<h3>Exclusions based on shapes</h3>
3059+
3060+
<div class=example>
3061+
<img src=heart1.png>
3062+
<pre>
3063+
article::column(1) {
3064+
shape-inside: circle(50%, 50%, 30%);
3065+
}
3066+
article::column(1) {
3067+
shape-inside: polygon(x1, y1, x2, y2, x3, y3, ... xn, yn);
3068+
color: red;
3069+
}
3070+
</pre>
30143071
</div>
30153072

3073+
<div class=example>
3074+
<img src=heart2.png>
3075+
<pre>
3076+
article::column(1) {
3077+
shape-: circle(x, y, z);
3078+
}
3079+
article::column(1) {
3080+
shape-outside: polygon(x1, y1, x2, y2, x3, y3, ... xn, yn);
3081+
}
3082+
</pre>
3083+
</div>
30163084

30173085

30183086
<!--
@@ -3096,8 +3164,8 @@ <h2>Selecting columns and pages</h2>
30963164

30973165
<p>Pseudo-elements are introduced to apply styling to the part of an
30983166
element that ends up on a certain page of column of that element. The
3099-
'column(n)' pseudo-element selects columns, and the 'page(n)'
3100-
psedo-element select columns.
3167+
'column(n)' pseudo-element selects columns, the 'column(n,p)' pseudo-element selects columns on certain pages, nad the 'page(n)'
3168+
psedo-element select pages.
31013169

31023170
<div class=example>
31033171
<pre>
@@ -3106,6 +3174,7 @@ <h2>Selecting columns and pages</h2>
31063174
div.chapter::column(2,2) /* second column on second page */
31073175
div.chapter::column(*,2) /* all columns on the second page */
31083176
div.chapter::page(2) /* second page of the element */
3177+
div.chapter::page(2-4) /* select page 2, 3, and 4 */
31093178
div.chapter::page(2)::column(2) /* second column, but only if it appears on the second page */
31103179
</pre>
31113180
</div>

0 commit comments

Comments
 (0)