Skip to content

Commit 897feb1

Browse files
authored
Use h1 tag for the title instead of h2 (#512)
* Use h1 tag for the title instead of h2 From https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements: "A page should generally have a single <h1> element that describes the content of the page (similar to the document's <title> element)." Also change scribble.css so that the h1, h2, h3, etc heading font-sizes match the old h2, h3, h4, etc font-sizes. * fix overlap of version box and authorlistbox
1 parent 5dd81d8 commit 897feb1

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

scribble-lib/scribble/html-render.rkt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,9 +1150,10 @@
11501150
(= 2 (length t))
11511151
(cadr t))))
11521152
`((,(case (number-depth number)
1153-
[(0) 'h2]
1154-
[(1) 'h3]
1155-
[(2) 'h4]
1153+
[(0) 'h1]
1154+
[(1) 'h2]
1155+
[(2) 'h3]
1156+
[(3) 'h4]
11561157
[else 'h5])
11571158
,(append
11581159
(if (and src taglet)

scribble-lib/scribble/scribble.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,28 @@ p, .SIntrapara {
5757
margin: 1em 0;
5858
}
5959

60-
h2 { /* per-page main title */
60+
h1 { /* per-page main title */
61+
font-size: 1.5em;
6162
margin-top: 0;
6263
}
6364

64-
h3, h4, h5, h6, h7, h8 {
65+
h2, h3, h4, h5, h6, h7, h8 {
6566
margin-top: 1.75em;
6667
margin-bottom: 0.5em;
6768
}
6869

70+
h2 {
71+
font-size: 1.17em;
72+
}
73+
74+
h3 {
75+
font-size: 1.00em;
76+
}
77+
78+
h4 {
79+
font-size: 0.83em;
80+
}
81+
6982
.SSubSubSubSection {
7083
font-weight: bold;
7184
font-size: 0.83em; /* should match h5; from HTML 4 reference */
@@ -487,7 +500,7 @@ ol ol ol ol { list-style-type: upper-alpha; }
487500
position: relative;
488501
float: right;
489502
left: 2em;
490-
top: -2.5em;
503+
top: -2.25em;
491504
height: 0em;
492505
width: 13em;
493506
margin: 0em -13em 0em 0em;

0 commit comments

Comments
 (0)