Skip to content

Commit 8678c5f

Browse files
committed
Adjustments for print
1 parent 1b975b7 commit 8678c5f

File tree

7 files changed

+58
-38
lines changed

7 files changed

+58
-38
lines changed

01-css-fundamentals/external-stylesheet-representation.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#css2 {top: 23em; left: 38em; width: 25em;}
1515

1616
section h1 {position: absolute; width: 100%; bottom: 0.15em; left: 0; margin: 0;
17-
font: bold 2em "Proxima Sans", Helvetica, sans-serif; text-align: center;}
17+
font: italic 2em "Proxima Sans", Helvetica, sans-serif; text-align: center;}
1818

1919
section img {position: absolute;
2020
z-index: -1;}
@@ -35,8 +35,8 @@
3535
<head>
3636
<title>Eric’s World of Waffles</title>
3737
<meta charset="utf-8">
38-
<strong>&lt;link rel="stylesheet" media="screen,print"
39-
href="sheet1.css"&gt;</strong>
38+
<strong>&lt;link rel="stylesheet" href="sheet1.css"
39+
media="screen,print"&gt;</strong>
4040
&lt;style type="text/css"&gt;
4141
/* These are my styles! Yay! */
4242
<strong>@import url(sheet2.css);</strong>

01-css-fundamentals/structure-of-a-rule.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353
.above span {
5454
padding-block-end: 4ch;
55-
margin-block-end: -1.75ch;
55+
margin-block-end: -1.5ch;
5656
background-position: 50% 100%;
5757
}
5858
.above span:nth-child(1) {
@@ -64,7 +64,7 @@
6464
}
6565
.above span:nth-child(2) {
6666
grid-column: span 2;
67-
margin-block-end: -4ch;
67+
margin-block-end: -4.33ch;
6868
padding-block-end: 4ch;
6969
color: #AAA;
7070
}
@@ -86,8 +86,8 @@
8686
grid-template-columns: 24ch 15ch;
8787
}
8888
.below > span > span {
89-
padding-block-start: 5ch;
90-
margin-block-start: -1.5ch;
89+
padding-block-start: 5.5ch;
90+
margin-block-start: -2.2ch;
9191
background-position: 50% 0%;
9292

9393
}

06-basic-visual-formatting/horizontal-formatting-subtractive-padding-margin.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
<title>Subtractive padding</title>
66
<link rel="stylesheet" type="text/css" href="base.css">
77
<style type="text/css">
8-
header {width: 260px; border: 1px solid gray; border-bottom: 0; margin-bottom: 2px; text-align: center; height: 10px;}
8+
header {width: 240px; border: 1px solid gray; border-bottom: 0; margin-bottom: 2px; text-align: center; height: 10px;}
99
header b {font: italic 0.9em sans-serif; background: white; padding: 0 0.33em; line-height: 1px; vertical-align: top;}
10-
div {float: left; border: 1px dotted gray;}
10+
div {max-width: max-content; border: 1px dotted gray;}
1111
p {background: #DDD;}
1212
</style>
1313
</head>
1414
<body>
1515

16-
<header><b>260px</b></header>
16+
<header><b>240px</b></header>
1717
<div>
18-
<p style="width: 200px; padding: 10px; margin: 20px;">wideness?</p>
18+
<p style="width: 200px; padding: 10px; margin: 20px; box-sizing: border-box;">wideness?</p>
1919
</div>
2020

2121
</body>

06-basic-visual-formatting/showing-lines-different-alignments-writing-modes.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<meta http-equiv="content-type" content="text/html; charset=utf-8">
77
<link rel="stylesheet" type="text/css" href="c/base.css">
88
<style type="text/css">
9-
body {width: 60em;}
9+
body {width: 61em;}
1010
.arena {display: flex; justify-content: start; gap: 2em; width: 100%; font-size: 1.33em;}
11-
div.hor {width: 24em; flex: 0 0 auto;}
12-
div.ver {writing-mode: vertical-rl; height: 21em; margin-top: 1em;}
11+
div.hor {width: 20em; flex: 0 0 auto;}
12+
div.ver {writing-mode: vertical-rl; height: 25em; margin-top: 1em;}
1313
p {border: 1px dashed gray;}
1414
.cl1 {text-align: left;}
1515
.cl2 {text-align: right;}

11-flexbox/justify-content-values.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767

6868
figcaption {
69-
font: bold 1.67em monospace;
69+
font: bold 2em monospace;
7070
}
7171
div > p {
7272
border: 1px solid;

15-text-properties/text-align-justify.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
<title>Justified text</title>
66
<link rel="stylesheet" type="text/css" href="ch06.css">
77
<style type="text/css">
8-
p {width: 500px; border: 1px dotted gray; float: left; margin-left: 2em; text-align: justify;}
9-
p + p {width: 300px;}
8+
body {display: flex; align-items: start;}
9+
p {width: 30em; border: 1px dotted gray; margin-left: 2em; text-align: justify;}
10+
p + p {width: 24em;}
1011
</style>
1112
</head>
1213
<body>
1314

1415
<p class="cl4">
15-
This paragraph is styled <code>text-align: justify;</code>, which causes the line boxes within the element to align their left and right edges to the left and right inner content edges of the paragraph. The exception is the last line box, whose right edge does not align with the right content edge of the paragraph. (In right-to-left languages, the left edge of the last line box would not be so aligned.)
16+
This paragraph is styled <code>text-align: justify</code>, which causes the line boxes within the element to align their left and right edges to the left and right inner content edges of the paragraph. The exception is the last line box, whose right edge does not align with the right content edge of the paragraph. (In right-to-left languages, the left edge of the last line box would not be so aligned.)
1617
</p>
1718
<p class="cl4">
18-
This paragraph is styled <code>text-align: justify;</code>, which causes the line boxes within the element to align their left and right edges to the left and right inner content edges of the paragraph. The exception is the last line box, whose right edge does not align with the right content edge of the paragraph. (In right-to-left languages, the left edge of the last line box would not be so aligned.)
19+
This paragraph is styled <code>text-align: justify</code>, which causes the line boxes within the element to align their left and right edges to the left and right inner content edges of the paragraph. The exception is the last line box, whose right edge does not align with the right content edge of the paragraph. (In right-to-left languages, the left edge of the last line box would not be so aligned.)
1920
</p>
2021

2122
</body>

15-text-properties/text-emphasis-various.html

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,31 @@
55
<title>Various emphasis marks</title>
66
<link rel="stylesheet" type="text/css" href="ch06.css">
77
<style type="text/css">
8-
body {width: 80em; font-size: 1rem;}
9-
table {border-collapse: collapse; border-spacing: 0;}
8+
body {width: 60em; font-size: 1rem;}
9+
table {border-collapse: collapse; border-spacing: 0; margin-block-end: 3em;}
10+
table + table {margin: 0;}
1011
th, td {border: 1px solid; border-width: 0 2px 2px 0;}
11-
th {padding: 0.5em; font: bold 1.5em Consolas, monospace;}
12-
tbody td div {display: flex; justify-content: space-between;}
13-
td p {font-size: 1.5em; margin: 0.25em; padding: 0.25em; width: 50%; box-sizing: border-box;}
12+
th {padding: 0.5em; font: bold 1.75em Consolas, monospace;}
13+
tbody td div {display: flex; justify-content: space-evenly;}
14+
td p {font-size: 1.75em; margin: 0.25em; padding: 0.25em; width: 40%; box-sizing: border-box;}
1415
td p.v {writing-mode: vertical-rl; max-height: 5em; border-left: 1px dashed gray;}
1516
thead th {vertical-align: bottom; padding-block-start: 0;}
1617
tbody th {padding-inline-start: 0;}
1718

1819
tbody tr.filled td:nth-of-type(1) span {-webkit-text-emphasis-style: sesame; text-emphasis-style: sesame;}
1920
tbody tr.filled td:nth-of-type(2) span {-webkit-text-emphasis-style: dot; text-emphasis-style: dot;}
20-
tbody tr.filled td:nth-of-type(3) span {-webkit-text-emphasis-style: circle; text-emphasis-style: circle;}
21-
tbody tr.filled td:nth-of-type(4) span {-webkit-text-emphasis-style: double-circle; text-emphasis-style: double-circle;}
22-
tbody tr.filled td:nth-of-type(5) span {-webkit-text-emphasis-style: triangle; text-emphasis-style: triangle;}
23-
tbody tr.filled td:nth-of-type(6) span {-webkit-text-emphasis-style: "cool"; text-emphasis-style: "cool";}
24-
21+
tbody tr.filled td:nth-of-type(3) span {-webkit-text-emphasis-style: triangle; text-emphasis-style: triangle;}
2522
tbody tr.open td:nth-of-type(1) span {-webkit-text-emphasis-style: open sesame; text-emphasis-style: open sesame;}
2623
tbody tr.open td:nth-of-type(2) span {-webkit-text-emphasis-style: open dot; text-emphasis-style: open dot;}
27-
tbody tr.open td:nth-of-type(3) span {-webkit-text-emphasis-style: open circle; text-emphasis-style: open circle;}
28-
tbody tr.open td:nth-of-type(4) span {-webkit-text-emphasis-style: open double-circle; text-emphasis-style: open double-circle;}
29-
tbody tr.open td:nth-of-type(5) span {-webkit-text-emphasis-style: open triangle; text-emphasis-style: open triangle;}
30-
tbody tr.open td:nth-of-type(6) span {-webkit-text-emphasis-style: "cool"; text-emphasis-style: "cool";}
24+
tbody tr.open td:nth-of-type(3) span {-webkit-text-emphasis-style: open triangle; text-emphasis-style: open triangle;}
25+
26+
table + table tbody tr.filled td:nth-of-type(1) span {-webkit-text-emphasis-style: circle; text-emphasis-style: circle;}
27+
table + table tbody tr.filled td:nth-of-type(2) span {-webkit-text-emphasis-style: double-circle; text-emphasis-style: double-circle;}
28+
table + table tbody tr.filled td:nth-of-type(3) span {-webkit-text-emphasis-style: "cool"; text-emphasis-style: "cool";}
29+
table + table tbody tr.open td:nth-of-type(1) span {-webkit-text-emphasis-style: open circle; text-emphasis-style: open circle;}
30+
table + table tbody tr.open td:nth-of-type(2) span {-webkit-text-emphasis-style: open double-circle; text-emphasis-style: open double-circle;}
31+
table + table tbody tr.open td:nth-of-type(3) span {-webkit-text-emphasis-style: "cool"; text-emphasis-style: "cool";}
32+
3133
</style>
3234
</head>
3335
<body>
@@ -39,10 +41,7 @@
3941
<th></th>
4042
<th>sesame</th>
4143
<th>dot</th>
42-
<th>circle</th>
43-
<th>double-circle</th>
4444
<th>triangle</th>
45-
<th>"cool"</th>
4645
</tr>
4746
</thead>
4847
<tbody>
@@ -66,6 +65,9 @@
6665
<p class="v"><span>세로</span> 언어 마크</p>
6766
</div>
6867
</td>
68+
</tr>
69+
<tr class="open">
70+
<th>open</th>
6971
<td>
7072
<div>
7173
<p class="h"><span>horizontal</span> language marks</p>
@@ -84,8 +86,22 @@
8486
<p class="v"><span>세로</span> 언어 마크</p>
8587
</div>
8688
</td>
87-
<tr class="open">
88-
<th>open</th>
89+
</tr>
90+
</tbody>
91+
</table>
92+
93+
<table>
94+
<thead>
95+
<tr>
96+
<th></th>
97+
<th>circle</th>
98+
<th>double-circle</th>
99+
<th>"cool"</th>
100+
</tr>
101+
</thead>
102+
<tbody>
103+
<tr class="filled">
104+
<th>filled</th>
89105
<td>
90106
<div>
91107
<p class="h"><span>horizontal</span> language marks</p>
@@ -104,6 +120,9 @@
104120
<p class="v"><span>세로</span> 언어 마크</p>
105121
</div>
106122
</td>
123+
</tr>
124+
<tr class="open">
125+
<th>open</th>
107126
<td>
108127
<div>
109128
<p class="h"><span>horizontal</span> language marks</p>

0 commit comments

Comments
 (0)