diff --git a/aio/src/styles/0-base/_typography.scss b/aio/src/styles/0-base/_typography.scss index 8a2751fff1..e0d83a57a3 100755 --- a/aio/src/styles/0-base/_typography.scss +++ b/aio/src/styles/0-base/_typography.scss @@ -210,6 +210,7 @@ code { > a { &[href^="http:"], &[href^="https:"] { + display: inline-flex; padding-right: calc(1em + 0.25rem); position: relative; diff --git a/aio/src/styles/2-modules/_code.scss b/aio/src/styles/2-modules/_code.scss index f9d588f5dc..577b2ccd85 100644 --- a/aio/src/styles/2-modules/_code.scss +++ b/aio/src/styles/2-modules/_code.scss @@ -169,11 +169,17 @@ aio-code { } } - :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(pre) > code { - background-color: rgba($lightgray, 0.5); - border-radius: 4px; - color: $deepgray; - padding: 4px; + :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(pre) { + > code { + background-color: rgba($lightgray, 0.5); + border-radius: 4px; + color: $deepgray; + padding: 0 4px; + } + + &:not(a) > code { + padding: 4px; + } } .page-guide-cheatsheet & {