From b3f71d921e212a2032ebdfcf0ddb3838022f34fe Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 23 Sep 2025 22:30:21 -0700 Subject: [PATCH] Bring back btn-check for now, but move to button stylesheet --- scss/buttons/_button.scss | 15 ++++ .../content/docs/components/button-group.mdx | 2 +- site/src/content/docs/components/buttons.mdx | 73 ++++++++++++++++++- site/src/content/docs/customize/overview.mdx | 3 - 4 files changed, 88 insertions(+), 5 deletions(-) diff --git a/scss/buttons/_button.scss b/scss/buttons/_button.scss index 2bbe49459f..c5f2da5597 100644 --- a/scss/buttons/_button.scss +++ b/scss/buttons/_button.scss @@ -279,4 +279,19 @@ .btn-sm { @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm); } + + .btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; + + &[disabled], + &:disabled { + + .btn { + pointer-events: none; + filter: none; + opacity: .65; + } + } + } } diff --git a/site/src/content/docs/components/button-group.mdx b/site/src/content/docs/components/button-group.mdx index 5e59feb5b6..34a3055ad5 100644 --- a/site/src/content/docs/components/button-group.mdx +++ b/site/src/content/docs/components/button-group.mdx @@ -44,7 +44,7 @@ These classes can also be added to groups of links, as an alternative to the [`. ## Checkbox and radio button groups -Combine button-like checkbox and radio [toggle buttons]([[docsref:/forms/checks-radios]]) into a seamless looking button group. +Combine button-like checkbox and radio toggle buttons into a seamless looking button group. diff --git a/site/src/content/docs/components/buttons.mdx b/site/src/content/docs/components/buttons.mdx index 56f4abffa9..5fc49bda83 100644 --- a/site/src/content/docs/components/buttons.mdx +++ b/site/src/content/docs/components/buttons.mdx @@ -126,12 +126,83 @@ Additional utilities can be used to adjust the alignment of buttons when horizon `} /> +## Toggle buttons + +Create button-like checkboxes and radio buttons by using `.btn` styles rather than `.form-check-label` on the `