aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/scss/_reboot.scss
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/scss/_reboot.scss')
-rw-r--r--vendor/twbs/bootstrap/scss/_reboot.scss51
1 files changed, 24 insertions, 27 deletions
diff --git a/vendor/twbs/bootstrap/scss/_reboot.scss b/vendor/twbs/bootstrap/scss/_reboot.scss
index c55d42e44..4444ff0f0 100644
--- a/vendor/twbs/bootstrap/scss/_reboot.scss
+++ b/vendor/twbs/bootstrap/scss/_reboot.scss
@@ -54,12 +54,16 @@ body {
background-color: $body-bg; // 2
}
-// Suppress the focus outline on elements that cannot be accessed via keyboard.
-// This prevents an unwanted focus outline from appearing around elements that
-// might still respond to pointer events.
-//
-// Credit: https://github.com/suitcss/base
-[tabindex="-1"]:focus {
+// 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;
}
@@ -184,30 +188,25 @@ a {
text-decoration: $link-decoration;
background-color: transparent; // Remove the gray background on active links in IE 10.
- @include hover {
+ @include hover() {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
}
-// And undo these styles for placeholder links/named anchors (without href)
-// which have not been made explicitly keyboard-focusable (without tabindex).
+// 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([tabindex]) {
+a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
- @include hover-focus {
+ @include hover() {
color: inherit;
text-decoration: none;
}
-
- &:focus {
- outline: 0;
- }
}
@@ -230,6 +229,9 @@ pre {
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;
}
@@ -331,6 +333,13 @@ select {
text-transform: none; // Remove the inheritance of text transform in Firefox
}
+// Set the cursor for non-`<button>` buttons
+//
+// Details at https://github.com/twbs/bootstrap/pull/30562
+[role="button"] {
+ cursor: pointer;
+}
+
// Remove the inheritance of word-wrap in Safari.
//
// Details at https://github.com/twbs/bootstrap/issues/24990
@@ -377,18 +386,6 @@ input[type="checkbox"] {
}
-input[type="date"],
-input[type="time"],
-input[type="datetime-local"],
-input[type="month"] {
- // Remove the default appearance of temporal inputs to avoid a Mobile Safari
- // bug where setting a custom line-height prevents text from being vertically
- // centered within the input.
- // See https://bugs.webkit.org/show_bug.cgi?id=139848
- // and https://github.com/twbs/bootstrap/issues/11266
- -webkit-appearance: listbox;
-}
-
textarea {
overflow: auto; // Remove the default vertical scrollbar in IE.
// Textareas should really only resize vertically so they don't break their (horizontal) containers.