diff --git a/.changeset/famous-planes-dress.md b/.changeset/famous-planes-dress.md new file mode 100644 index 0000000000..f8f4f3877a --- /dev/null +++ b/.changeset/famous-planes-dress.md @@ -0,0 +1,5 @@ +--- +"@primer/css": patch +--- + +Render `code` at 100% font size irregardless of direct descension from `pre`. diff --git a/src/markdown/code.scss b/src/markdown/code.scss index 5ed6a6c39f..cd26409dd9 100644 --- a/src/markdown/code.scss +++ b/src/markdown/code.scss @@ -19,12 +19,15 @@ pre { word-wrap: normal; + code { + // stylelint-disable-next-line primer/typography + font-size: 100%; + } + // Code tags within code blocks (
s)
     > code {
       padding: 0;
       margin: 0;
-      // stylelint-disable-next-line primer/typography
-      font-size: 100%;
       word-break: normal;
       white-space: pre;
       background: transparent;