@@ -65,11 +65,12 @@ The recommended way of using an icon in a button is [an embedded SVG]({{< docsre
65
65
- set its dimensions to ` 1.25rem ` to match button size—except for ` .btn-sm ` where you should use ` 1rem ` ,
66
66
- apply ` .me-1 ` on it to get consistent spacing,
67
67
- fill it using ` currentColor ` to respect button color scheme,
68
- - finally add ` .overflow-visible ` utility to prevent SVG content from being cropped.
68
+
69
+ Please note that if you experience a problem with a cropped SVG, we recommend using the ` .overflow-visible ` utility on the SVG to fix its rendering.
69
70
70
71
{{< example >}}
71
72
<button type =" button " class =" btn btn-primary btn-sm " >
72
- <svg width =" 1rem " height =" 1rem " fill =" currentColor " aria-hidden =" true " class =" me-1 overflow-visible " >
73
+ <svg width =" 1rem " height =" 1rem " fill =" currentColor " aria-hidden =" true " class =" me-1 " >
73
74
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
74
75
</svg >
75
76
Primary
@@ -81,7 +82,7 @@ The recommended way of using an icon in a button is [an embedded SVG]({{< docsre
81
82
Primary
82
83
</button >
83
84
<button type =" button " class =" btn btn-primary btn-lg " >
84
- <svg width =" 1.25rem " height =" 1.25rem " fill =" currentColor " aria-hidden =" true " class =" me-1 overflow-visible " >
85
+ <svg width =" 1.25rem " height =" 1.25rem " fill =" currentColor " aria-hidden =" true " class =" me-1 " >
85
86
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
86
87
</svg >
87
88
Primary
@@ -94,7 +95,7 @@ Add `.btn-icon` to get a squared button, meant to only contain an icon. Make sur
94
95
95
96
{{< example >}}
96
97
<button type =" button " class =" btn btn-icon btn-outline-secondary btn-sm " >
97
- <svg width =" 1rem " height =" 1rem " fill =" currentColor " aria-hidden =" true " class = " overflow-visible " >
98
+ <svg width =" 1rem " height =" 1rem " fill =" currentColor " aria-hidden =" true " >
98
99
<use xlink:href =" /docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation " />
99
100
</svg >
100
101
<span class =" visually-hidden " >Secondary</span >
@@ -106,7 +107,7 @@ Add `.btn-icon` to get a squared button, meant to only contain an icon. Make sur
106
107
<span class =" visually-hidden " >Secondary</span >
107
108
</button >
108
109
<button type =" button " class =" btn btn-icon btn-outline-secondary btn-lg " >
109
- <svg width =" 1.25rem " height =" 1.25rem " fill =" currentColor " aria-hidden =" true " class = " overflow-visible " >
110
+ <svg width =" 1.25rem " height =" 1.25rem " fill =" currentColor " aria-hidden =" true " >
110
111
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
111
112
</svg >
112
113
<span class =" visually-hidden " >Secondary</span >
@@ -119,7 +120,7 @@ Use `.btn-no-outline` to get a borderless button as default state, and a consist
119
120
120
121
{{< example >}}
121
122
<button type =" button " class =" btn btn-icon btn-no-outline btn-sm " >
122
- <svg width =" 1rem " height =" 1rem " fill =" currentColor " aria-hidden =" true " class = " overflow-visible " >
123
+ <svg width =" 1rem " height =" 1rem " fill =" currentColor " aria-hidden =" true " >
123
124
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
124
125
</svg >
125
126
<span class =" visually-hidden " >No outline</span >
@@ -131,7 +132,7 @@ Use `.btn-no-outline` to get a borderless button as default state, and a consist
131
132
<span class =" visually-hidden " >No outline</span >
132
133
</button >
133
134
<button type =" button " class =" btn btn-icon btn-no-outline btn-lg " >
134
- <svg width =" 1.25rem " height =" 1.25rem " fill =" currentColor " aria-hidden =" true " class = " overflow-visible " >
135
+ <svg width =" 1.25rem " height =" 1.25rem " fill =" currentColor " aria-hidden =" true " >
135
136
<use xlink:href =" /docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation " />
136
137
</svg >
137
138
<span class =" visually-hidden " >No outline</span >
0 commit comments