Skip to content

Commit f40a89a

Browse files
committed
Correctly overwrite _reboot.scss to not apply font-size twice
This follows up on #11028 to do it differently in similar manner as in `_reboot.scss` so that code inside pre does not apply font-size a second time
1 parent 464c18c commit f40a89a

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

src/resources/formats/html/bootstrap/_bootstrap-rules.scss

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,15 +2150,26 @@ code.sourceCode a.code-annotation-anchor {
21502150
// override _reboot.scss
21512151

21522152
// code blocks
2153-
pre code {
2153+
pre {
21542154
font-family: $font-family-monospace-block;
21552155
// I'm really not confident that this is correct
21562156
@include font-size($code-block-font-size);
21572157
font-weight: $font-weight-monospace-block;
2158+
2159+
// adding these inherit overrides here
2160+
// is what `_reboot.scss` does.
2161+
// we mirror it here for consistency
2162+
//
2163+
// Account for some code outputs that place code tags in pre tags
2164+
code {
2165+
font-family: inherit;
2166+
@include font-size(inherit);
2167+
font-weight: inherit;
2168+
}
21582169
}
21592170

21602171
// code inlines
2161-
p code {
2172+
code {
21622173
font-family: $font-family-monospace-inline;
21632174
@include font-size($code-inline-font-size);
21642175
font-weight: $font-weight-monospace-inline;

0 commit comments

Comments
 (0)