You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Clean up button vars, docs, fix up .btn-link
* more buttons docs cleanup
* Remove colored links for theme utilities
* Fix scssdocs
* Fix broken link
* Fix another link
Copy file name to clipboardExpand all lines: site/src/content/docs/components/buttons.mdx
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,6 @@ Buttons have a standard `.btn` class that sets up basic styles such as padding a
14
14
15
15
The `.btn` class is intended to be a starting point for your own custom button styles, while our provided button variants used in conjunction with our button variants, or to serve as a basis for your own custom styles.
16
16
17
-
<Callouttype="warning">
18
-
When using `.btn` without a modifier, be sure to add some explicit `:focus-visible` styles.
19
-
</Callout>
20
-
21
17
## Playground
22
18
23
19
Bootstrap includes several button variants, each serving its own semantic purpose, with a few extras thrown in for more control. Combined with our utilities, you have a very powerful set of defaults to choose from.
@@ -26,17 +22,25 @@ Bootstrap includes several button variants, each serving its own semantic purpos
Add visual depth to solid buttons with gradients and shadows using the `.btn-styled` modifier class. This provides a more three-dimensional appearance that can be customized further with CSS variables.
@@ -58,10 +62,6 @@ The gradient and shadow can be customized via CSS variables:
58
62
|`--bs-btn-active-shadow`| Pressed/active state shadow |
59
63
</BsTable>
60
64
61
-
## Disable text wrapping
62
-
63
-
If you don’t want the button text to wrap, you can add the `.text-nowrap` class to the button. In Sass, you can set `$btn-white-space: nowrap` to disable text wrapping for each button.
64
-
65
65
## Button tags
66
66
67
67
The `.btn` classes are designed to be used with the `<button>` element. However, you can also use these classes on `<a>` or `<input>` elements (though some browsers may apply a slightly different rendering).
@@ -125,16 +125,14 @@ Combine with size classes for different icon button sizes:
125
125
126
126
## Disabled state
127
127
128
-
Make buttons look inactive by adding the `disabled` boolean attribute to any `<button>` element. Disabled buttons have `pointer-events: none` applied to, preventing hover and active states from triggering, and some additional styling to indicate the disabled state.
128
+
Make buttons look inactive by adding the `disabled` boolean attribute to any `<button>` element. Disabled buttons have `pointer-events: none`, preventing hover and active states from triggering, and some additional styling to indicate the disabled state.
Disabled buttons using the `<a>` element behave a bit different, and if you need to keep the `href` attribute, you may need additional HTML to fully disable the link functionality. Use the `.disabled` class instead of the attribute on `<a>` elements to make them visually appear disabled.
135
+
Disabled buttons using the `<a>` element behave a bit different. Use the `.disabled` class instead of the attribute on `<a>` elements to make them visually appear disabled. If you need to keep the `href` attribute, you may need additional HTML to fully disable the link functionality.
0 commit comments