aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/scss/_reboot.scss
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-07 12:56:27 +0200
committerMario <mario@mariovavti.com>2021-06-07 12:56:27 +0200
commitf3b4308cb59bf4b21ff186f8479c82239446d139 (patch)
tree0dcbdcffcfe0dd678958cbcc34f41cb1c470c69b /vendor/twbs/bootstrap/scss/_reboot.scss
parent67322c12643ced03bec0be70667f8b1c45de752f (diff)
downloadvolse-hubzilla-f3b4308cb59bf4b21ff186f8479c82239446d139.tar.gz
volse-hubzilla-f3b4308cb59bf4b21ff186f8479c82239446d139.tar.bz2
volse-hubzilla-f3b4308cb59bf4b21ff186f8479c82239446d139.zip
upgrade to bootstrap 5.0.1 and first batch of fixes
Diffstat (limited to 'vendor/twbs/bootstrap/scss/_reboot.scss')
-rw-r--r--vendor/twbs/bootstrap/scss/_reboot.scss495
1 files changed, 316 insertions, 179 deletions
diff --git a/vendor/twbs/bootstrap/scss/_reboot.scss b/vendor/twbs/bootstrap/scss/_reboot.scss
index cd93bfe24..352046988 100644
--- a/vendor/twbs/bootstrap/scss/_reboot.scss
+++ b/vendor/twbs/bootstrap/scss/_reboot.scss
@@ -1,5 +1,6 @@
// 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
@@ -10,38 +11,37 @@
// Document
//
-// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
-// 2. Change the default font family in all browsers.
-// 3. Correct the line height in all browsers.
-// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
-// 5. Change the default tap highlight to be completely transparent in iOS.
+// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
*,
*::before,
*::after {
- box-sizing: border-box; // 1
+ box-sizing: border-box;
}
-html {
- font-family: sans-serif; // 2
- line-height: 1.15; // 3
- -webkit-text-size-adjust: 100%; // 4
- -webkit-tap-highlight-color: rgba($black, 0); // 5
-}
-// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
-// TODO: remove in v5
-// stylelint-disable-next-line selector-list-comma-newline-after
-article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
- display: block;
+// Root
+//
+// Ability to the value of the root font sizes, affecting the value of `rem`.
+// null by default, thus nothing is generated.
+
+:root {
+ font-size: $font-size-root;
+
+ @if $enable-smooth-scroll {
+ @media (prefers-reduced-motion: no-preference) {
+ scroll-behavior: smooth;
+ }
+ }
}
+
// Body
//
// 1. Remove the margin in all browsers.
// 2. As a best practice, apply a default `background-color`.
-// 3. Set an explicit initial text-align value so that we can later use
-// the `inherit` value on things like `<th>` elements.
+// 3. Prevent adjustments of font size after orientation changes in iOS.
+// 4. Change the default tap highlight to be completely transparent in iOS.
body {
margin: 0; // 1
@@ -50,82 +50,120 @@ body {
font-weight: $font-weight-base;
line-height: $line-height-base;
color: $body-color;
- text-align: left; // 3
+ text-align: $body-text-align;
background-color: $body-bg; // 2
-}
-
-// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline
-// on elements that programmatically receive focus but wouldn't normally show a visible
-// focus outline. In general, this would mean that the outline is only applied if the
-// interaction that led to the element receiving programmatic focus was a keyboard interaction,
-// or the browser has somehow determined that the user is primarily a keyboard user and/or
-// wants focus outlines to always be presented.
-//
-// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
-// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
-[tabindex="-1"]:focus:not(:focus-visible) {
- outline: 0 !important;
+ -webkit-text-size-adjust: 100%; // 3
+ -webkit-tap-highlight-color: rgba($black, 0); // 4
}
// Content grouping
//
-// 1. Add the correct box sizing in Firefox.
-// 2. Show the overflow in Edge and IE.
+// 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 {
- box-sizing: content-box; // 1
- height: 0; // 1
- overflow: visible; // 2
+ margin: $hr-margin-y 0;
+ color: $hr-color; // 1
+ background-color: currentColor;
+ border: 0;
+ opacity: $hr-opacity;
+}
+
+hr:not([size]) {
+ height: $hr-height; // 2
}
-//
// Typography
//
+// 1. Remove top margins from headings
+// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
+// margin for easier control within type scales as it avoids margin collapsing.
-// Remove top margins from headings
-//
-// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
-// margin for easier control within type scales as it avoids margin collapsing.
-// stylelint-disable-next-line selector-list-comma-newline-after
-h1, h2, h3, h4, h5, h6 {
- margin-top: 0;
+%heading {
+ margin-top: 0; // 1
margin-bottom: $headings-margin-bottom;
+ font-family: $headings-font-family;
+ font-style: $headings-font-style;
+ font-weight: $headings-font-weight;
+ line-height: $headings-line-height;
+ color: $headings-color;
+}
+
+h1 {
+ @extend %heading;
+ @include font-size($h1-font-size);
}
+h2 {
+ @extend %heading;
+ @include font-size($h2-font-size);
+}
+
+h3 {
+ @extend %heading;
+ @include font-size($h3-font-size);
+}
+
+h4 {
+ @extend %heading;
+ @include font-size($h4-font-size);
+}
+
+h5 {
+ @extend %heading;
+ @include font-size($h5-font-size);
+}
+
+h6 {
+ @extend %heading;
+ @include font-size($h6-font-size);
+}
+
+
// Reset margins on paragraphs
//
// Similarly, the top margin on `<p>`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. Duplicate behavior to the data-* attribute for our tooltip plugin
-// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+// 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. Remove the bottom border in Firefox 39-.
-// 5. Prevent the text-decoration to be skipped.
+// 4. Prevent the text-decoration to be skipped.
abbr[title],
-abbr[data-original-title] { // 1
- text-decoration: underline; // 2
+abbr[data-bs-original-title] { // 1
text-decoration: underline dotted; // 2
cursor: help; // 3
- border-bottom: 0; // 4
- text-decoration-skip-ink: none; // 5
+ text-decoration-skip-ink: none; // 4
}
+
+// Address
+
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
+
+// Lists
+
+ol,
+ul {
+ padding-left: 2rem;
+}
+
ol,
ul,
dl {
@@ -144,33 +182,57 @@ dt {
font-weight: $dt-font-weight;
}
+// 1. Undo browser default
+
dd {
margin-bottom: .5rem;
- margin-left: 0; // Undo browser default
+ margin-left: 0; // 1
}
+
+// Blockquote
+
blockquote {
margin: 0 0 1rem;
}
+
+// Strong
+//
+// Add the correct font weight in Chrome, Edge, and Safari
+
b,
strong {
- font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
+ font-weight: $font-weight-bolder;
}
+
+// Small
+//
+// Add the correct font size in all browsers
+
small {
- @include font-size(80%); // Add the correct font size in all browsers
+ @include font-size($small-font-size);
}
+
+// Mark
+
+mark {
+ padding: $mark-padding;
+ background-color: $mark-bg;
+}
+
+
+// Sub and Sup
//
// Prevent `sub` and `sup` elements from affecting the line height in
// all browsers.
-//
sub,
sup {
position: relative;
- @include font-size(75%);
+ @include font-size($sub-sup-font-size);
line-height: 0;
vertical-align: baseline;
}
@@ -179,16 +241,13 @@ sub { bottom: -.25em; }
sup { top: -.5em; }
-//
// Links
-//
a {
color: $link-color;
text-decoration: $link-decoration;
- background-color: transparent; // Remove the gray background on active links in IE 10.
- @include hover() {
+ &:hover {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
@@ -200,82 +259,103 @@ a {
// See https://github.com/twbs/bootstrap/issues/19402
a:not([href]):not([class]) {
- color: inherit;
- text-decoration: none;
-
- @include hover() {
+ &,
+ &:hover {
color: inherit;
text-decoration: none;
}
}
-//
// Code
-//
pre,
code,
kbd,
samp {
- font-family: $font-family-monospace;
+ font-family: $font-family-code;
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
+ direction: ltr #{"/* rtl:ignore */"};
+ unicode-bidi: bidi-override;
}
+// 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 {
- // Remove browser default top margin
- margin-top: 0;
- // Reset browser default of `1em` to use `rem`s
- margin-bottom: 1rem;
- // Don't allow content to break outside
- overflow: auto;
- // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
- // making it impossible to interact with the content
- -ms-overflow-style: scrollbar;
+ display: block;
+ margin-top: 0; // 1
+ margin-bottom: 1rem; // 2
+ overflow: auto; // 3
+ @include font-size($code-font-size);
+ 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;
+ }
+}
+
+code {
+ @include font-size($code-font-size);
+ color: $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 {
- // Apply a consistent margin strategy (matches our type styles).
margin: 0 0 1rem;
}
-//
// Images and content
-//
-
-img {
- vertical-align: middle;
- border-style: none; // Remove the border on images inside links in IE 10-.
-}
+img,
svg {
- // Workaround for the SVG overflow bug in IE10/11 is still required.
- // See https://github.com/twbs/bootstrap/issues/26878
- overflow: hidden;
vertical-align: middle;
}
-//
// Tables
//
+// Prevent double borders
table {
- border-collapse: collapse; // Prevent double borders
+ caption-side: bottom;
+ border-collapse: collapse;
}
caption {
- padding-top: $table-cell-padding;
- padding-bottom: $table-cell-padding;
+ padding-top: $table-cell-padding-y;
+ padding-bottom: $table-cell-padding-y;
color: $table-caption-color;
text-align: left;
- caption-side: bottom;
}
// 1. Removes font-weight bold by inheriting
@@ -288,20 +368,29 @@ th {
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 {
- // Allow labels to use `margin` for spacing.
- display: inline-block;
- margin-bottom: $label-margin-bottom;
+ display: inline-block; // 1
}
// Remove the default `border-radius` that macOS Chrome adds.
-//
-// Details at https://github.com/twbs/bootstrap/issues/24093
+// See https://github.com/twbs/bootstrap/issues/24093
+
button {
// stylelint-disable-next-line property-disallowed-list
border-radius: 0;
@@ -316,27 +405,24 @@ button:focus:not(:focus-visible) {
outline: 0;
}
+// 1. Remove the margin in Firefox and Safari
+
input,
button,
select,
optgroup,
textarea {
- margin: 0; // Remove the margin in Firefox and Safari
+ margin: 0; // 1
font-family: inherit;
@include font-size(inherit);
line-height: inherit;
}
-button,
-input {
- overflow: visible; // Show the overflow in Edge
-}
-
+// Remove the inheritance of text transform in Firefox
button,
select {
- text-transform: none; // Remove the inheritance of text transform in Firefox
+ text-transform: none;
}
-
// Set the cursor for non-`<button>` buttons
//
// Details at https://github.com/twbs/bootstrap/pull/30562
@@ -344,141 +430,192 @@ select {
cursor: pointer;
}
-// Remove the inheritance of word-wrap in Safari.
-//
-// Details at https://github.com/twbs/bootstrap/issues/24990
select {
+ // Remove the inheritance of word-wrap in Safari.
+ // See https://github.com/twbs/bootstrap/issues/24990
word-wrap: normal;
+
+ // Undo the opacity change from Chrome
+ &:disabled {
+ opacity: 1;
+ }
}
+// Remove the dropdown arrow in Chrome from inputs built with datalists.
+// See https://stackoverflow.com/a/54997118
+
+[list]::-webkit-calendar-picker-indicator {
+ display: none;
+}
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
// controls in Android 4.
// 2. Correct the inability to style clickable types in iOS and Safari.
+// 3. Opinionated: add "hand" cursor to non-disabled button elements.
+
button,
[type="button"], // 1
[type="reset"],
[type="submit"] {
-webkit-appearance: button; // 2
-}
-// Opinionated: add "hand" cursor to non-disabled button elements.
-@if $enable-pointer-cursor-for-buttons {
- button,
- [type="button"],
- [type="reset"],
- [type="submit"] {
+ @if $enable-button-pointers {
&:not(:disabled) {
- cursor: pointer;
+ cursor: pointer; // 3
}
}
}
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
-button::-moz-focus-inner,
-[type="button"]::-moz-focus-inner,
-[type="reset"]::-moz-focus-inner,
-[type="submit"]::-moz-focus-inner {
+
+::-moz-focus-inner {
padding: 0;
border-style: none;
}
-input[type="radio"],
-input[type="checkbox"] {
- box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
- padding: 0; // 2. Remove the padding in IE 10-
-}
-
+// 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
textarea {
- overflow: auto; // Remove the default vertical scrollbar in IE.
- // Textareas should really only resize vertically so they don't break their (horizontal) containers.
- resize: vertical;
+ resize: vertical; // 1
}
+// 1. Browsers set a default `min-width: min-content;` on fieldsets,
+// unlike e.g. `<div>`s, which have `min-width: 0;` by default.
+// So we reset that to ensure fieldsets behave more like a standard block element.
+// See https://github.com/twbs/bootstrap/issues/12359
+// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
+// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
+
fieldset {
- // Browsers set a default `min-width: min-content;` on fieldsets,
- // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
- // So we reset that to ensure fieldsets behave more like a standard block element.
- // See https://github.com/twbs/bootstrap/issues/12359
- // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
- min-width: 0;
- // Reset the default outline behavior of fieldsets so they don't affect page layout.
- padding: 0;
- margin: 0;
- border: 0;
+ min-width: 0; // 1
+ padding: 0; // 2
+ margin: 0; // 2
+ border: 0; // 2
}
-// 1. Correct the text wrapping in Edge and IE.
-// 2. Correct the color inheritance from `fieldset` elements in IE.
+// 1. By using `float: left`, the legend will behave like a block element.
+// This way the border of a fieldset wraps around the legend if present.
+// 2. Fix wrapping bug.
+// See https://github.com/twbs/bootstrap/issues/29712
+
legend {
- display: block;
+ float: left; // 1
width: 100%;
- max-width: 100%; // 1
padding: 0;
- margin-bottom: .5rem;
- @include font-size(1.5rem);
+ margin-bottom: $legend-margin-bottom;
+ @include font-size($legend-font-size);
+ font-weight: $legend-font-weight;
line-height: inherit;
- color: inherit; // 2
- white-space: normal; // 1
+
+ + * {
+ clear: left; // 2
+ }
}
-progress {
- vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
+// Fix height of inputs with a type of datetime-local, date, month, week, or time
+// See https://github.com/twbs/bootstrap/issues/18842
+
+::-webkit-datetime-edit-fields-wrapper,
+::-webkit-datetime-edit-text,
+::-webkit-datetime-edit-minute,
+::-webkit-datetime-edit-hour-field,
+::-webkit-datetime-edit-day-field,
+::-webkit-datetime-edit-month-field,
+::-webkit-datetime-edit-year-field {
+ padding: 0;
}
-// Correct the cursor style of increment and decrement buttons in Chrome.
-[type="number"]::-webkit-inner-spin-button,
-[type="number"]::-webkit-outer-spin-button {
+::-webkit-inner-spin-button {
height: auto;
}
+// 1. Correct the outline style in Safari.
+// 2. 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.
+
[type="search"] {
- // 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.
- outline-offset: -2px; // 2. Correct the outline style in Safari.
- -webkit-appearance: none;
+ outline-offset: -2px; // 1
+ -webkit-appearance: textfield; // 2
}
-//
+// 1. A few input types should stay LTR
+// See https://rtlstyling.com/posts/rtl-styling#form-inputs
+// 2. RTL only output
+// See https://rtlcss.com/learn/usage-guide/control-directives/#raw
+
+/* rtl:raw:
+[type="tel"],
+[type="url"],
+[type="email"],
+[type="number"] {
+ direction: ltr;
+}
+*/
+
// Remove the inner padding in Chrome and Safari on macOS.
-//
-[type="search"]::-webkit-search-decoration {
+::-webkit-search-decoration {
-webkit-appearance: none;
}
-//
-// 1. Correct the inability to style clickable types in iOS and Safari.
-// 2. Change font properties to `inherit` in Safari.
-//
+// Remove padding around color pickers in webkit browsers
+
+::-webkit-color-swatch-wrapper {
+ padding: 0;
+}
+
+
+// Inherit font family and line height for file input buttons
+
+::file-selector-button {
+ font: inherit;
+}
+
+// 1. Change font properties to `inherit`
+// 2. Correct the inability to style clickable types in iOS and Safari.
::-webkit-file-upload-button {
- font: inherit; // 2
- -webkit-appearance: button; // 1
+ font: inherit; // 1
+ -webkit-appearance: button; // 2
}
-//
// Correct element displays
-//
output {
display: inline-block;
}
+// Remove border from iframe
+
+iframe {
+ border: 0;
+}
+
+// Summary
+//
+// 1. Add the correct display in all browsers
+
summary {
- display: list-item; // Add the correct display in all browsers
+ display: list-item; // 1
cursor: pointer;
}
-template {
- display: none; // Add the correct display in IE
+
+// Progress
+//
+// Add the correct vertical alignment in Chrome, Firefox, and Opera.
+
+progress {
+ vertical-align: baseline;
}
-// Always hide an element with the `hidden` HTML attribute (from PureCSS).
-// Needed for proper display in IE 10-.
+
+// Hidden attribute
+//
+// Always hide an element with the `hidden` HTML attribute.
+
[hidden] {
display: none !important;
}