diff options
| author | Bobby <[email protected]> | 2024-08-16 20:47:33 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-16 20:47:33 -0400 |
| commit | 6b28433d9cfde435be8ec2bd6cf91e6324d08865 (patch) | |
| tree | 8343c27b8b95ff5639233e81cf157f92e5688466 /scss/_reboot.scss | |
| parent | d53094ec16ba385faae2973ddee648698b32ab24 (diff) | |
| parent | 048f56f51460df75e92a2f7b472e1c56baeb68f7 (diff) | |
| download | bootstrap-main.tar.xz bootstrap-main.zip | |
Diffstat (limited to 'scss/_reboot.scss')
| -rw-r--r-- | scss/_reboot.scss | 68 |
1 files changed, 31 insertions, 37 deletions
diff --git a/scss/_reboot.scss b/scss/_reboot.scss index bf0eb9e25..5e1665c35 100644 --- a/scss/_reboot.scss +++ b/scss/_reboot.scss @@ -27,7 +27,7 @@ :root { @if $font-size-root != null { - font-size: var(--#{$variable-prefix}root-font-size); + @include font-size(var(--#{$prefix}root-font-size)); } @if $enable-smooth-scroll { @@ -48,13 +48,13 @@ // scss-docs-start reboot-body-rules body { margin: 0; // 1 - font-family: var(--#{$variable-prefix}body-font-family); - font-size: var(--#{$variable-prefix}body-font-size); - font-weight: var(--#{$variable-prefix}body-font-weight); - line-height: var(--#{$variable-prefix}body-line-height); - color: var(--#{$variable-prefix}body-color); - text-align: var(--#{$variable-prefix}body-text-align); - background-color: var(--#{$variable-prefix}body-bg); // 2 + font-family: var(--#{$prefix}body-font-family); + @include font-size(var(--#{$prefix}body-font-size)); + font-weight: var(--#{$prefix}body-font-weight); + line-height: var(--#{$prefix}body-line-height); + color: var(--#{$prefix}body-color); + text-align: var(--#{$prefix}body-text-align); + background-color: var(--#{$prefix}body-bg); // 2 -webkit-text-size-adjust: 100%; // 3 -webkit-tap-highlight-color: rgba($black, 0); // 4 } @@ -64,20 +64,15 @@ body { // Content grouping // // 1. Reset Firefox's gray color -// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field hr { margin: $hr-margin-y 0; color: $hr-color; // 1 - background-color: $hr-bg-color; - border: $hr-border-width; + border: 0; + border-top: $hr-border-width solid $hr-border-color; opacity: $hr-opacity; } -hr:not([size]) { - height: $hr-height; // 2 -} - // Typography // @@ -92,7 +87,7 @@ hr:not([size]) { font-style: $headings-font-style; font-weight: $headings-font-weight; line-height: $headings-line-height; - color: $headings-color; + color: var(--#{$prefix}heading-color); } h1 { @@ -139,16 +134,14 @@ p { // Abbreviations // -// 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin -// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari. -// 3. Add explicit cursor to indicate changed behavior. -// 4. Prevent the text-decoration to be skipped. +// 1. Add the correct text decoration in Chrome, Edge, Opera, and Safari. +// 2. Add explicit cursor to indicate changed behavior. +// 3. Prevent the text-decoration to be skipped. -abbr[title], -abbr[data-bs-original-title] { // 1 - text-decoration: underline dotted; // 2 - cursor: help; // 3 - text-decoration-skip-ink: none; // 4 +abbr[title] { + text-decoration: underline dotted; // 1 + cursor: help; // 2 + text-decoration-skip-ink: none; // 3 } @@ -224,7 +217,8 @@ small { mark { padding: $mark-padding; - background-color: $mark-bg; + color: var(--#{$prefix}highlight-color); + background-color: var(--#{$prefix}highlight-bg); } @@ -248,11 +242,11 @@ sup { top: -.5em; } // Links a { - color: $link-color; + color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1)); text-decoration: $link-decoration; &:hover { - color: $link-hover-color; + --#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb); text-decoration: $link-hover-decoration; } } @@ -303,7 +297,7 @@ pre { code { @include font-size($code-font-size); - color: $code-color; + color: var(--#{$prefix}code-color); word-wrap: break-word; // Streamline the style when inside anchors to avoid broken underline and more @@ -443,11 +437,11 @@ select { } } -// Remove the dropdown arrow in Chrome from inputs built with datalists. +// Remove the dropdown arrow only from text type inputs built with datalists in Chrome. // See https://stackoverflow.com/a/54997118 -[list]::-webkit-calendar-picker-indicator { - display: none; +[list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="week"]):not([type="time"])::-webkit-calendar-picker-indicator { + display: none !important; } // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` @@ -505,9 +499,9 @@ legend { width: 100%; padding: 0; margin-bottom: $legend-margin-bottom; - @include font-size($legend-font-size); font-weight: $legend-font-weight; line-height: inherit; + @include font-size($legend-font-size); + * { clear: left; // 2 @@ -531,15 +525,15 @@ legend { height: auto; } -// 1. Correct the outline style in Safari. -// 2. This overrides the extra rounded corners on search inputs in iOS so that our +// 1. This overrides the extra rounded corners on search inputs in iOS so that our // `.form-control` class can properly style them. Note that this cannot simply // be added to `.form-control` as it's not specific enough. For details, see // https://github.com/twbs/bootstrap/issues/11586. +// 2. Correct the outline style in Safari. [type="search"] { - outline-offset: -2px; // 1 - -webkit-appearance: textfield; // 2 + -webkit-appearance: textfield; // 1 + outline-offset: -2px; // 2 } // 1. A few input types should stay LTR |
