Skip to content

Commit

Permalink
Fix inline code style not applied to stylized text (mmistakes#3253)
Browse files Browse the repository at this point in the history
* bug: inline code style not applied to stylized text

* Use double colons for pseudoelements
  • Loading branch information
iBug authored and minyoongi96 committed Aug 26, 2024
1 parent 687194b commit 1f109be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
18 changes: 0 additions & 18 deletions _sass/minimal-mistakes/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,6 @@ pre {
overflow-x: auto; /* add scrollbars to wide code blocks*/
}

p > code,
a > code,
li > code,
figcaption > code,
td > code {
padding-top: 0.1rem;
padding-bottom: 0.1rem;
font-size: 0.8em;
background: $code-background-color;
border-radius: $border-radius;

&:before,
&:after {
letter-spacing: -0.2em;
content: "\00a0"; /* non-breaking space*/
}
}

/* horizontal rule */

hr {
Expand Down
16 changes: 15 additions & 1 deletion _sass/minimal-mistakes/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ body {
}
}

:not(pre) > code {
padding-top: 0.1rem;
padding-bottom: 0.1rem;
font-size: 0.8em;
background: $code-background-color;
border-radius: $border-radius;

&::before,
&::after {
letter-spacing: -0.2em;
content: "\00a0"; /* non-breaking space*/
}
}

dt {
margin-top: 1em;
font-family: $sans-serif;
Expand Down Expand Up @@ -561,4 +575,4 @@ body {
padding-right: 0;
}
}
}
}

0 comments on commit 1f109be

Please sign in to comment.