diff --git a/scss/block/_preformatted-text.scss b/scss/block/_preformatted-text.scss index a49f12da..9e43d5bf 100644 --- a/scss/block/_preformatted-text.scss +++ b/scss/block/_preformatted-text.scss @@ -21,3 +21,33 @@ font-weight: var(#{$css-var-prefix}font-weight); } } + +@if map.get($modules, "content/code") { + // Reboot based on : + // - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css + // - sanitize.css v13.0.0 | CC0 1.0 Universal | github.com/csstools/sanitize.css + // –––––––––––––––––––– + + // 1. Correct the inheritance and scaling of font size in all browsers + // 2. Correct the odd `em` font sizing in all browsers + #{$parent-selector} pre { + font-size: 0.875em; // 2 + font-family: var(#{$css-var-prefix}font-family); // 1 + // Prevent overflow of the container in all browsers (opinionated) + -ms-overflow-style: scrollbar; + overflow: auto; + } + + // Pico + // –––––––––––––––––––– + #{$parent-selector} pre { + border-radius: var(#{$css-var-prefix}border-radius); + background: var(#{$css-var-prefix}code-background-color); + color: var(#{$css-var-prefix}code-color); + font-weight: var(#{$css-var-prefix}font-weight); + line-height: initial; + display: block; + margin-bottom: var(#{$css-var-prefix}spacing); + overflow-x: auto; + } +} diff --git a/scss/content/_typography.scss b/scss/content/_typography.scss index 34a42bd6..4139f05b 100644 --- a/scss/content/_typography.scss +++ b/scss/content/_typography.scss @@ -11,12 +11,6 @@ // - sanitize.css v13.0.0 | CC0 1.0 Universal | github.com/csstools/sanitize.css // –––––––––––––––––––– - // Add the correct font weight in Chrome, Edge, and Safari - #{$parent-selector} b, - #{$parent-selector} strong { - font-weight: bolder; - } - // Prevent `sub` and `sup` elements from affecting the line height in all browsers #{$parent-selector} sub, #{$parent-selector} sup { diff --git a/scss/inline/_bidirectional-isolation.scss b/scss/inline/_bidirectional-isolation.scss index 48ed6ff6..39188d12 100644 --- a/scss/inline/_bidirectional-isolation.scss +++ b/scss/inline/_bidirectional-isolation.scss @@ -1,6 +1,4 @@ /** SASS for the HTML element - * - * * Add your styles here */ diff --git a/scss/inline/_bidirectional-override.scss b/scss/inline/_bidirectional-override.scss index 8c9116e6..1c7997c6 100644 --- a/scss/inline/_bidirectional-override.scss +++ b/scss/inline/_bidirectional-override.scss @@ -1,6 +1,4 @@ /** SASS for the HTML element - * - * * Add your styles here */ diff --git a/scss/inline/_bold.scss b/scss/inline/_bold.scss index 89c2ac29..b439b76f 100644 --- a/scss/inline/_bold.scss +++ b/scss/inline/_bold.scss @@ -1,6 +1,13 @@ /** SASS for the HTML element - * - * * Add your styles here */ +@use "sass:map"; +@use "../settings" as *; + +@if map.get($modules, "content/typography") { + // Add the correct font weight in Chrome, Edge, and Safari + #{$parent-selector} b{ + font-weight: bolder; + } +} diff --git a/scss/inline/_button.scss b/scss/inline/_button.scss index dcb5282e..cdb813c2 100644 --- a/scss/inline/_button.scss +++ b/scss/inline/_button.scss @@ -1,28 +1,10 @@ /** SASS for the