Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 805fb8f

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
doc: allow <code> in header elements
Allow use of <code> in header elements without styling side effects. We can add styling later if desired. The goal here is to allow code to be set off in markdown without needing to escape characters and do lint exceptions for terms. This is probably a win in terms of accessibility too although it would be moreso if we had some visual differentiation for <code> inside of headers. As mentioned above, that can always be added at a later time. Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent f5cd6d7 commit 805fb8f
Copy full SHA for 805fb8f

File tree

Expand file treeCollapse file tree

1 file changed

+20
-15
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+20
-15
lines changed
Open diff view settings
Collapse file

‎doc/api_assets/style.css‎

Copy file name to clipboardExpand all lines: doc/api_assets/style.css
+20-15Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,28 @@ body {
2020
background-color: #fff;
2121
}
2222

23-
h1 { font-size: 2.5rem; }
24-
h2 { font-size: 2rem; }
25-
h3 { font-size: 1.75rem; }
26-
h4 { font-size: 1.5rem; }
27-
h5 { font-size: 1.25rem; }
28-
h6 { font-size: 1rem; }
29-
30-
h1,
31-
h2,
32-
h3,
33-
h4,
34-
h5,
35-
h6 {
36-
margin: 1.5rem 0 1rem;
37-
text-rendering: optimizeLegibility;
23+
h1, h1 code { font-size: 2.5rem; }
24+
h2, h2 code { font-size: 2rem; }
25+
h3, h3 code { font-size: 1.75rem; }
26+
h4, h4 code { font-size: 1.5rem; }
27+
h5, h5 code { font-size: 1.25rem; }
28+
h6, h6 code { font-size: 1rem; }
29+
30+
h1, h1 code,
31+
h2, h2 code,
32+
h3, h3 code,
33+
h4, h4 code,
34+
h5, h5 code,
35+
h6, h6 code {
36+
background-color: inherit;
37+
color: inherit;
38+
font-family: inherit;
3839
font-weight: 700;
40+
line-height: inherit;
3941
position: relative;
42+
margin: 1.5rem 0 1rem;
43+
padding: inherit;
44+
text-rendering: optimizeLegibility;
4045
}
4146

4247
pre,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.