Skip to content

Commit 3051fcd

Browse files
authoredMay 27, 2022
Fix inline code style not applied to stylized text (#3253)
* bug: inline code style not applied to stylized text * Use double colons for pseudoelements
1 parent 4e19f46 commit 3051fcd

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed
 

‎_sass/minimal-mistakes/_base.scss

-18
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,6 @@ pre {
160160
overflow-x: auto; /* add scrollbars to wide code blocks*/
161161
}
162162

163-
p > code,
164-
a > code,
165-
li > code,
166-
figcaption > code,
167-
td > code {
168-
padding-top: 0.1rem;
169-
padding-bottom: 0.1rem;
170-
font-size: 0.8em;
171-
background: $code-background-color;
172-
border-radius: $border-radius;
173-
174-
&:before,
175-
&:after {
176-
letter-spacing: -0.2em;
177-
content: "\00a0"; /* non-breaking space*/
178-
}
179-
}
180-
181163
/* horizontal rule */
182164

183165
hr {

‎_sass/minimal-mistakes/_page.scss

+15-1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ body {
139139
}
140140
}
141141

142+
:not(pre) > code {
143+
padding-top: 0.1rem;
144+
padding-bottom: 0.1rem;
145+
font-size: 0.8em;
146+
background: $code-background-color;
147+
border-radius: $border-radius;
148+
149+
&::before,
150+
&::after {
151+
letter-spacing: -0.2em;
152+
content: "\00a0"; /* non-breaking space*/
153+
}
154+
}
155+
142156
dt {
143157
margin-top: 1em;
144158
font-family: $sans-serif;
@@ -561,4 +575,4 @@ body {
561575
padding-right: 0;
562576
}
563577
}
564-
}
578+
}

0 commit comments

Comments
 (0)
Please sign in to comment.