Skip to content

Commit f198d7b

Browse files
iBugnjjc
authored andcommitted
Fix inline code style not applied to stylized text (mmistakes#3253)
* bug: inline code style not applied to stylized text * Use double colons for pseudoelements
1 parent c90d718 commit f198d7b

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
@@ -158,24 +158,6 @@ pre {
158158
overflow-x: auto; /* add scrollbars to wide code blocks*/
159159
}
160160

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

181163
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)