All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.scss._reboot.scss Maven / Gradle / Ivy

Go to download

Orange Boosted with Bootstrap is a Bootstrap based, Orange branded accessible and ergonomic components library.

The newest version!
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix


// Reboot
//
// Normalization of HTML elements, manually forked from Normalize.css to remove
// styles targeting irrelevant browsers while applying new styles.
//
// Normalize is licensed MIT. https://github.com/necolas/normalize.css


// Document
//
// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.

*,
*::before,
*::after {
  box-sizing: border-box;
}


// Root
//
// Ability to the value of the root font sizes, affecting the value of `rem`.
// null by default, thus nothing is generated.

:root {
  @if $font-size-root != null {
    @include font-size(var(--#{$prefix}root-font-size));
  }

  @if $enable-smooth-scroll {
    @media (prefers-reduced-motion: no-preference) {
      scroll-behavior: smooth;
    }
  }

  // Boosted mod: Improve focus visibility when fixed/sticky header is used
  // See https://caniuse.com/?search=scroll-padding
  // scss-docs-start scroll-offset
  @if $enable-fixed-header {
    scroll-padding-top: $scroll-offset-top * .5;

    @include media-breakpoint-up(lg) {
      scroll-padding-top: $scroll-offset-top;
    }
  }
  // scss-docs-end scroll-offset
  // End mod
}


// Body
//
// 1. Remove the margin in all browsers.
// 2. As a best practice, apply a default `background-color`.
// 3. Prevent adjustments of font size after orientation changes in iOS.
// 4. Change the default tap highlight to be completely transparent in iOS.
// 5. Prevent faux-bold/italic
//    See https://developer.mozilla.org/fr/docs/Web/CSS/font-synthesis

// scss-docs-start reboot-body-rules
body {
  position: relative; // Boosted mod: required for back-to-top component
  margin: 0; // 1
  font-family: var(--#{$prefix}body-font-family);
  font-synthesis: none; // Boosted mod // 5
  @include font-size(var(--#{$prefix}body-font-size));
  font-weight: var(--#{$prefix}body-font-weight);
  line-height: var(--#{$prefix}body-line-height);
  // Boosted mod: no color
  text-align: var(--#{$prefix}body-text-align);

  /* rtl:remove */
  letter-spacing: $letter-spacing-base; // Boosted mod
  background-color: var(--#{$prefix}body-bg); // 2
  -webkit-text-size-adjust: 100%; // 3
  -webkit-tap-highlight-color: rgba($black, 0); // 4
  -webkit-font-smoothing: subpixel-antialiased; // Boosted mod
  text-rendering: optimizespeed; // Boosted mod
}
// scss-docs-end reboot-body-rules


// Boosted mod: focus state
//
// 1. Default focus state
// 2. Using the :focus-visible polyfill to hide outline defensively
//    See https://github.com/WICG/focus-visible
//    Note 1: this rule is not applied for our focus ring helper which
//    handles itself outline and box shadow
//    Note 2: this rule is also not applied for invalid select and invalid input files to ensure
//    sufficient contrast between select elements on error focused vs. non focused
// 3. Using the :focus-visible pseudo-class if supported by the browser
// scss-docs-start focus-visibility
:focus {
  @include focus-visible(); // 1
}

.js-focus-visible :focus:not([data-focus-visible-added]):not(.focus-ring):not(.form-select:invalid):not(.form-control[type="file"]:invalid),
.js-focus-visible .focus:not([data-focus-visible-added]):not(.focus-ring):not(.form-select:invalid):not(.form-control[type="file"]:invalid) { // 2
  outline: 0 !important;
  box-shadow: none;
}

:focus:not(:focus-visible):not(.focus-ring):not(.form-select:invalid):not(.form-control[type="file"]:invalid) { // 3
  outline: 0 !important;
  box-shadow: none;
}
// scss-docs-end focus-visibility
// End mod


// Content grouping
//
// 1. Reset Firefox's gray color

hr {
  margin: $hr-margin-y 0;
  color: $hr-color; // 1
  border: 0;
  border-top: $hr-border-width solid $hr-border-color;
  opacity: $hr-opacity;
}


// Typography
//
// 1. Remove top margins from headings
//    By default, `

`-`

` all receive top and bottom margins. We nuke the top // margin for easier control within type scales as it avoids margin collapsing. %heading { margin-top: 0; // 1 margin-bottom: $headings-margin-bottom; @include font-size($font-size-base); // Boosted mod font-family: $headings-font-family; font-style: $headings-font-style; font-weight: $headings-font-weight; line-height: $headings-line-height; color: var(--#{$prefix}heading-color); /* rtl:remove */ letter-spacing: $letter-spacing-base; // Boosted mod -webkit-font-smoothing: antialiased; // Boosted mod -moz-osx-font-smoothing: grayscale; // Boosted mod text-rendering: optimizelegibility; // Boosted mod } h1 { @extend %heading; @include font-size($h4-font-size); line-height: $h4-line-height; /* rtl:remove */ letter-spacing: $h4-spacing; } h2, h3 { @extend %heading; @include font-size($h5-font-size); line-height: $h5-line-height; /* rtl:remove */ letter-spacing: $h5-spacing; } h4, h5, h6 { @extend %heading; } // Reset margins on paragraphs // // Similarly, the top margin on `

`s get reset. However, we also reset the // bottom margin to use `rem` units instead of `em`. p { margin-top: 0; margin-bottom: $paragraph-margin-bottom; } // Abbreviations // // 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] { text-decoration: underline dotted; // 1 cursor: help; // 2 text-decoration-skip-ink: none; // 3 } // Address address { margin-bottom: 1rem; font-style: normal; line-height: inherit; } // Lists ol, ul { padding-left: 2rem; } ol, ul, dl { margin-top: 0; margin-bottom: 1rem; } ol ol, ul ul, ol ul, ul ol { margin-bottom: 0; } // Boosted mod // Orange square list-style ul { list-style-type: square; } // Future-proof markers' color // See https://developer.mozilla.org/fr/docs/Web/CSS/::marker // stylelint-disable selector-max-type li::marker { color: var(--#{$prefix}primary); vertical-align: middle; ol & { color: inherit; } } li li::marker { color: var(--#{$prefix}secondary-color); } li li li::marker { color: var(--#{$prefix}tertiary-color); } // Bullet-proof markers' color // @todo To remove when ::marker support is OK // See https://caniuse.com/#search=%3A%3Amarker li::before { color: var(--#{$prefix}primary); vertical-align: text-top; ol & { color: inherit; } } li li::before { color: var(--#{$prefix}secondary-color); } li li li::before { color: var(--#{$prefix}tertiary-color); } // stylelint-enable selector-max-type // End mod dt { font-weight: $dt-font-weight; } // 1. Undo browser default dd { margin-bottom: .5rem; margin-left: 0; // 1 } // Blockquote blockquote { margin: 0 0 1rem; } // Strong // // Add the correct font weight in Chrome, Edge, and Safari b, em, // Boosted mod strong { font-weight: $font-weight-bold; // Boosted mod: ensure 700 } // Small // // Add the correct font size in all browsers small { @include font-size($small-font-size); // Boosted mod font-weight: $font-weight-normal; line-height: $line-height-sm; // End mod } // Mark mark { padding: $mark-padding; color: var(--#{$prefix}highlight-color); background-color: var(--#{$prefix}highlight-bg); } // Sub and Sup // // Prevent `sub` and `sup` elements from affecting the line height in // all browsers. sub, sup { position: relative; @include font-size($sub-sup-font-size); line-height: 0; vertical-align: baseline; } sub { bottom: -.25em; } sup { top: -.5em; } // Links a { color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1)); text-decoration: $link-decoration; &:hover { --#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb); text-decoration: $link-hover-decoration; } } // And undo these styles for placeholder links/named anchors (without href). // It would be more straightforward to just use a[href] in previous block, but that // causes specificity issues in many other styles that are too complex to fix. // See https://github.com/twbs/bootstrap/issues/19402 a:not([href]):not([class]) { &, &:hover { color: inherit; text-decoration: none; } } // Code var, // Boosted mod pre, code, kbd, samp { font-family: $font-family-code; @include font-size(1em); // Correct the odd `em` font sizing in all browsers. } // 1. Remove browser default top margin // 2. Reset browser default of `1em` to use `rem`s // 3. Don't allow content to break outside pre { display: block; margin-top: 0; // 1 margin-bottom: 1rem; // 2 overflow: auto; // 3 @include font-size($code-font-size); line-height: $pre-line-height; // Boosted mod color: $pre-color; // Account for some code outputs that place code tags in pre tags code { @include font-size(inherit); color: inherit; word-break: normal; } } var, // Boosted mod code { @include font-size($code-font-size); font-style: normal; // Boosted mod: is italic in all browsers line-height: $line-height-sm; // Boosted mod color: var(--#{$prefix}code-color); word-wrap: break-word; // Streamline the style when inside anchors to avoid broken underline and more a > & { color: inherit; } } kbd { padding: $kbd-padding-y $kbd-padding-x; @include font-size($kbd-font-size); color: $kbd-color; background-color: $kbd-bg; @include border-radius($border-radius-sm); kbd { padding: 0; @include font-size(1em); font-weight: $nested-kbd-font-weight; } } // Figures // // Apply a consistent margin strategy (matches our type styles). figure { margin: 0 0 1rem; } // Images and content img, svg { vertical-align: middle; } // Tables // // 1. Prevent double borders // 2. Ensure horizontal alignment in table when using numbers // See https://twitter.com/wesbos/status/932644812582522880 // See https://caniuse.com/#feat=font-variant-numeric // See https://caniuse.com/#feat=font-feature // See https://helpx.adobe.com/fonts/using/open-type-syntax.html#tnum table { font-feature-settings: "tnum"; // Boosted mod: 2 font-variant-numeric: tabular-nums; // Boosted mod: 2 caption-side: top; // Boosted mod border-collapse: collapse; } caption { padding-top: $table-caption-padding-y; padding-bottom: $table-caption-padding-y; @include font-size($h1-font-size); // Boosted mod font-weight: $font-weight-bold; // Boosted mod color: $table-caption-color; text-align: left; /* rtl:remove */ letter-spacing: $h1-spacing; // Boosted mod -webkit-font-smoothing: antialiased; // Boosted mod -moz-osx-font-smoothing: grayscale; // Boosted mod text-rendering: optimizelegibility; // Boosted mod } // 1. Removes font-weight bold by inheriting // 2. Matches default `` alignment by inheriting `text-align`. // 3. Fix alignment for Safari th { font-weight: $table-th-font-weight; // 1 text-align: inherit; // 2 text-align: -webkit-match-parent; // 3 } thead, tbody, tfoot, tr, td, th { border-color: inherit; border-style: solid; border-width: 0; } // Forms // // 1. Allow labels to use `margin` for spacing. label { display: inline-block; // 1 font-weight: $form-label-font-weight; // Boosted mod } // Remove the default `border-radius` that macOS Chrome adds. // See https://github.com/twbs/bootstrap/issues/24093 button { // stylelint-disable-next-line property-disallowed-list border-radius: 0; } // Explicitly remove focus outline in Chromium when it shouldn't be // visible (e.g. as result of mouse click or touch tap). It already // should be doing this automatically, but seems to currently be // confused and applies its very visible two-tone outline anyway. // // This rule is not applied with the focus ring utility which handles // itself outline and box shadow button:focus:not(:focus-visible):not(.focus-ring) { outline: 0; box-shadow: none; // Bosted mod } // 1. Remove the margin in Firefox and Safari input, button, select, optgroup, textarea { margin: 0; // 1 font-family: inherit; @include font-size(inherit); line-height: inherit; /* rtl:remove */ letter-spacing: inherit; // Boosted mod box-shadow: none; // Boosted mod: prevent native validation styles to apply } // Remove the inheritance of text transform in Firefox button, select { text-transform: none; } // Set the cursor for non-`





© 2015 - 2025 Weber Informatics LLC | Privacy Policy