Skip to content

Commit 4ac023b

Browse files
fix: drop unused .overflow-visible when used with SVGs in some components (#2701)
In Badge, Buttons, Orange navbar, and Form example --------- Co-authored-by: Julien Déramond <[email protected]>
1 parent c13d6f0 commit 4ac023b

File tree

8 files changed

+69
-58
lines changed

8 files changed

+69
-58
lines changed

site/content/docs/5.3/components/badge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Please refer to our [Boosted Navbars examples]({{< docsref "/examples/navbars" >
6767

6868
{{< example >}}
6969
<a href="#" class="position-relative">
70-
<svg width="2rem" height="2rem" fill="currentColor" aria-hidden="true" class="overflow-visible">
70+
<svg width="2rem" height="2rem" fill="currentColor" aria-hidden="true">
7171
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#buy"/>
7272
</svg>
7373
<span class="visually-hidden">Shopping basket</span>

site/content/docs/5.3/components/buttons.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ The recommended way of using an icon in a button is [an embedded SVG]({{< docsre
6565
- set its dimensions to `1.25rem` to match button size—except for `.btn-sm` where you should use `1rem`,
6666
- apply `.me-1` on it to get consistent spacing,
6767
- 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.
6970

7071
{{< example >}}
7172
<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">
7374
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
7475
</svg>
7576
Primary
@@ -81,7 +82,7 @@ The recommended way of using an icon in a button is [an embedded SVG]({{< docsre
8182
Primary
8283
</button>
8384
<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">
8586
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
8687
</svg>
8788
Primary
@@ -94,7 +95,7 @@ Add `.btn-icon` to get a squared button, meant to only contain an icon. Make sur
9495

9596
{{< example >}}
9697
<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">
9899
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
99100
</svg>
100101
<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
106107
<span class="visually-hidden">Secondary</span>
107108
</button>
108109
<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">
110111
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
111112
</svg>
112113
<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
119120

120121
{{< example >}}
121122
<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">
123124
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
124125
</svg>
125126
<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
131132
<span class="visually-hidden">No outline</span>
132133
</button>
133134
<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">
135136
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#tick-confirmation"/>
136137
</svg>
137138
<span class="visually-hidden">No outline</span>

site/content/docs/5.3/components/orange-navbar.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,15 @@ An additional navbar (with text or icon items) can be added on the right of the
180180
<ul class="navbar-nav flex-row">
181181
<li class="nav-item">
182182
<a href="#" class="nav-link nav-icon">
183-
<svg width="1.5rem" height="1.5rem" fill="currentColor" aria-hidden="true" class="overflow-visible">
183+
<svg width="1.5rem" height="1.5rem" fill="currentColor" aria-hidden="true">
184184
<use xlink:href="/docs/{{<param docs_version>}}/assets/img/boosted-sprite.svg#search" />
185185
</svg>
186186
<span class="visually-hidden">Search</span>
187187
</a>
188188
</li>
189189
<li class="nav-item">
190190
<a href="#" class="nav-link nav-icon">
191-
<svg width="1.5rem" height="1.5rem" fill="currentColor" aria-hidden="true" class="overflow-visible">
191+
<svg width="1.5rem" height="1.5rem" fill="currentColor" aria-hidden="true">
192192
<use xlink:href="/docs/{{<param docs_version>}}/assets/img/boosted-sprite.svg#buy" />
193193
</svg>
194194
<span class="visually-hidden">Basket</span>
@@ -364,7 +364,7 @@ You can add a search input into your Global header.
364364
<ul class="navbar-nav flex-row">
365365
<li class="nav-item d-lg-none">
366366
<a href="#" class="nav-link nav-icon">
367-
<svg width="1.5rem" height="1.5rem" fill="currentColor" aria-hidden="true" class="overflow-visible">
367+
<svg width="1.5rem" height="1.5rem" fill="currentColor" aria-hidden="true">
368368
<use xlink:href="/docs/{{<param docs_version>}}/assets/img/boosted-sprite.svg#search" />
369369
</svg>
370370
<span class="visually-hidden">Search</span>

0 commit comments

Comments
 (0)