diff --git a/scss/_buttons.scss b/scss/_buttons.scss index 7c45534e001f..16f9f67cca68 100644 --- a/scss/_buttons.scss +++ b/scss/_buttons.scss @@ -34,11 +34,6 @@ @include box-shadow(none); } - // Opinionated: add "hand" cursor to non-disabled .btn elements - &:not(:disabled):not(.disabled) { - cursor: pointer; - } - &:not(:disabled):not(.disabled):active, &:not(:disabled):not(.disabled).active { @include box-shadow($btn-active-box-shadow); diff --git a/scss/_close.scss b/scss/_close.scss index 821922f4c473..ec6593a8889e 100644 --- a/scss/_close.scss +++ b/scss/_close.scss @@ -17,9 +17,6 @@ @include hover-focus { opacity: .75; } - - // Opinionated: add "hand" cursor to non-disabled .close elements - cursor: pointer; } } diff --git a/scss/_navbar.scss b/scss/_navbar.scss index b5bc5a9748fd..9344a245adeb 100644 --- a/scss/_navbar.scss +++ b/scss/_navbar.scss @@ -116,11 +116,6 @@ @include hover-focus { text-decoration: none; } - - // Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements - &:not(:disabled):not(.disabled) { - cursor: pointer; - } } // Keep as a separate element so folks can easily override it with another icon diff --git a/scss/_pagination.scss b/scss/_pagination.scss index 9349f3f900ff..b4345311d366 100644 --- a/scss/_pagination.scss +++ b/scss/_pagination.scss @@ -27,11 +27,6 @@ outline: $pagination-focus-outline; box-shadow: $pagination-focus-box-shadow; } - - // Opinionated: add "hand" cursor to non-disabled .page-link elements - &:not(:disabled):not(.disabled) { - cursor: pointer; - } } .page-item { diff --git a/scss/_reboot.scss b/scss/_reboot.scss index ebbc1790126b..de7a14371b34 100644 --- a/scss/_reboot.scss +++ b/scss/_reboot.scss @@ -349,6 +349,18 @@ button, -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"] { + &:not(:disabled) { + cursor: pointer; + } + } +} + // Remove inner border and padding from Firefox, but don't restore the outline like Normalize. button::-moz-focus-inner, [type="button"]::-moz-focus-inner, diff --git a/scss/_variables.scss b/scss/_variables.scss index 2d5a5e67ff95..30a69d796350 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -114,6 +114,7 @@ $enable-transitions: true !default; $enable-prefers-reduced-motion-media-query: true !default; $enable-hover-media-query: false !default; // Deprecated, no longer affects any compiled CSS $enable-grid-classes: true !default; +$enable-pointer-cursor-for-buttons: true !default; $enable-print-styles: true !default; $enable-validation-icons: true !default; diff --git a/site/docs/4.2/assets/scss/_clipboard-js.scss b/site/docs/4.2/assets/scss/_clipboard-js.scss index 0cf39964464a..e2dd56e2594d 100644 --- a/site/docs/4.2/assets/scss/_clipboard-js.scss +++ b/site/docs/4.2/assets/scss/_clipboard-js.scss @@ -25,7 +25,6 @@ padding: .25rem .5rem; font-size: 75%; color: #818a91; - cursor: pointer; background-color: transparent; border: 0; @include border-radius; diff --git a/site/docs/4.2/content/reboot.md b/site/docs/4.2/content/reboot.md index 7801e346e652..e25d6e2de035 100644 --- a/site/docs/4.2/content/reboot.md +++ b/site/docs/4.2/content/reboot.md @@ -206,6 +206,7 @@ Various form elements have been rebooted for simpler base styles. Here are some - `