Skip to content

Commit ce8e44b

Browse files
committed
[css-multicol] added example SVG images
1 parent 28220c1 commit ce8e44b

File tree

6 files changed

+329
-117
lines changed

6 files changed

+329
-117
lines changed

css-multicol-1/Overview.bs

Lines changed: 33 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,19 @@ Two assumptions are being made by the pseudo-algorithm:
517517
regard for explicit column breaks or constrained column heights,
518518
while the actual value takes these into consideration.
519519

520-
<div class=example>
520+
<div class="example">
521521
In this example, the actual column-count is higher than the used column-count due to explicit column breaks:
522522

523523
<pre highlight="css">
524-
div { width: 40em; columns: 20em; column-gap: 0 }
525-
p { break-after: column }
524+
div {
525+
width: 40em;
526+
columns: 20em;
527+
column-gap: 0;
528+
}
529+
530+
p {
531+
break-after: column;
532+
}
526533
</pre>
527534

528535
<pre highlight="html">
@@ -532,8 +539,10 @@ Two assumptions are being made by the pseudo-algorithm:
532539
&lt;p>three
533540
&lt;/div>
534541
</pre>
535-
536-
The computed column-count is auto, the used column-count is 2 and the actual column-count is 3.
542+
<figure>
543+
<img src="images/column-count-higher-than-used-count.svg" alt="Two columns drawn inside the container, one outside">
544+
<figcaption>The computed column-count is auto, the used column-count is 2 and the actual column-count is 3.</figcaption>
545+
</figure>
537546
</div>
538547

539548
<div class=example>
@@ -709,6 +718,11 @@ Column gaps and rules</h2>
709718
column-rule-color: black;
710719
}
711720
</pre>
721+
722+
<figure>
723+
<img src="images/rule-same-width-as-gap.svg" alt="The rule completely covers any gap.">
724+
<figcaption>The column rule and column gap occupy the same space.</figcaption>
725+
</figure>
712726
</div>
713727

714728

@@ -782,54 +796,20 @@ Spanning columns</h2>
782796

783797
<div class="example">
784798
In this example, an <code>h2</code> element has been added to the
785-
sample document after the sixth sentence (i.e., after the word "jkl."). This styling applies:
799+
sample document after the sixth sentence (i.e., after the words "the leg of a"). This styling applies:
786800

787801
<pre highlight="css">
788802
h2 { column-span: all; background: silver }
789803
</pre>
790804

791-
By setting 'column-span' to ''column-span/all'', all content that appear before
805+
By setting 'column-span' to ''column-span/all'', all content that appears before
792806
the <code>h2</code> element is shown before the <code>h2</code>
793807
element.
794808

795-
<div class=cols>
796-
Ab cde fgh i jkl. Mno<br>
797-
pqr stu vw xyz. A bc<br>
798-
<br><br>
799-
M nop qrst uv wx yz.<br>
800-
Ab cde fgh i jkl. Mno<br>
801-
pqr stu vw xyz. A bc<br>
802-
def g hij klm nopqrs<br>
803-
tuv wxy z. Abc de fg<br>
804-
hi jklmno. Pqrstu vw<br>
805-
806-
<div class="col" style="left: 175px">
807-
def g hij klm nopqrs<br>
808-
tuv wxy z. Abc de fg<br>
809-
<br><br>
810-
x yz. Abc def ghi jkl.<br>
811-
M nop qrst uv wx yz.<br>
812-
Ab cde fgh i jkl. Mno<br>
813-
pqr stu vw xyz. A bc<br>
814-
def g hij klm nopqrs<br>
815-
tuv wxy z. Abc de fg<br>
816-
</div>
817-
818-
<div class="col" style="left: 350px">
819-
hi jklmno. Pqrstu vw<br>
820-
x yz. Abc def ghi jkl.<br>
821-
<br><br>
822-
hi jklmno. Pqrstu vw<br>
823-
x yz. Abc def ghi jkl.<br>
824-
M nop qrst uv wx yz.<br>
825-
Ab cde fgh i jkl. Mno<br>
826-
pqr stu vw xyz.
827-
</div>
828-
829-
<div class=rep style="width: 490px; height: 20px; background: silver; font-size: 1.5em; padding: 5px">An H2 element</div>
830-
<div class=gap style="left: 150px"></div>
831-
<div class=gap style="left: 325px"></div>
832-
</div>
809+
<figure>
810+
<img src="images/h2-spanner.svg" alt="An element spans all three columns">
811+
<figcaption>The h2 element is set to column-span: all</figcaption>
812+
</figure>
833813
</div>
834814

835815
A spanning element takes up more space than the element would take
@@ -845,85 +825,21 @@ Spanning columns</h2>
845825
As a result, the element appears as if 'column-span: none' was
846826
specified.
847827

848-
<div class=cols style="height: 100px">
849-
<div class="col" style="">
850-
Ab cde fgh i jkl. Mno<br>
851-
pqr stu vw xyz. A bc<br>
852-
def g hij klm nopqrs<br>
853-
tuv wxy z. Abc de fg<br>
854-
hi jklmno. Pqrstu vw<br>
855-
</div>
856-
857-
<div class="col" style="left: 175px">
858-
x yz. Abc def ghi jkl.<br>
859-
M nop qrst uv wx yz.<br>
860-
Ab cde fgh i jkl. Mno<br>
861-
pqr stu vw xyz. A bc<br>
862-
def g hij klm nopqrs
863-
</div>
864-
865-
<div class="col" style="left: 350px">
866-
tuv wxy z. Abc de fg<br>
867-
hi jklmno. Pqrstu vw<br>
868-
x yz. Abc def ghi jkl.<br>
869-
M nop qrst uv wx yz.<br>
870-
Ab cde fgh i jkl. Mno<br>
871-
</div>
872-
873-
<div class="col" style="left: 525px">
874-
pqr stu vw xyz.
875-
<div class=rep style="width: 140px; height: 40px; background: silver; font-size: 1.5em; padding: 5px; margin: 0; position: static">An H2 element</div>
876-
A bc def g hij klm
877-
</div>
878-
879-
<div class="col" style="left: 700px">
880-
nopqrs tuv wxy z.
881-
</div>
882-
883-
<div class=gap style="left: 150px"></div>
884-
<div class=gap style="left: 325px"></div>
885-
<div class=gap style="left: 500px"></div>
886-
<div class=gap style="left: 675px"></div>
887-
</div>
828+
<figure>
829+
<img src="images/h2-in-the-overflow-no-span.svg" alt="The h2 element is in an overflow column" style="max-height: 107px;">
830+
<figcaption>The h2 element is in an overflow column and appears as if column-span none is specified</figcaption>
831+
</figure>
888832
</div>
889833

890834
<div class="example">
891835
This example is similar to the previous example,
892836
except that the H2 element appears naturally in the last column.
893837
Still, there is not enough room to make the element spanning.
894838

895-
<div class=cols style="height: 100px">
896-
<div class="col" style="">
897-
Ab cde fgh i jkl. Mno<br>
898-
pqr stu vw xyz. A bc<br>
899-
def g hij klm nopqrs<br>
900-
tuv wxy z. Abc de fg<br>
901-
hi jklmno. Pqrstu vw<br>
902-
</div>
903-
904-
<div class="col" style="left: 175px">
905-
x yz. Abc def ghi jkl.<br>
906-
M nop qrst uv wx yz.<br>
907-
Ab cde fgh i jkl. Mno<br>
908-
pqr stu vw xyz. A bc<br>
909-
def g hij klm nopqrs
910-
</div>
911-
912-
<div class="col" style="left: 350px">
913-
tuv wxy z. Abc de fg<br>
914-
hi jklmno.
915-
<div class=rep style="width: 140px; height: 40px; background: silver; font-size: 1.5em; padding: 5px; margin: 0; position: static">An H2 element</div>
916-
</div>
917-
918-
<div class="col" style="left: 525px">
919-
A bc def g hij klm<br>
920-
nop w rstu vw xyz.
921-
</div>
922-
923-
<div class=gap style="left: 150px"></div>
924-
<div class=gap style="left: 325px"></div>
925-
<div class=gap style="left: 500px"></div>
926-
</div>
839+
<figure>
840+
<img src="images/h2-in-the-last-column-no-span.svg" alt="The h2 element is in the final column" style="max-height: 107px;">
841+
<figcaption>The h2 element is in the final column and appears as if column-span none is specified</figcaption>
842+
</figure>
927843
</div>
928844

929845
<div class="example">
Lines changed: 14 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)