Skip to content

Commit 7f53421

Browse files
Fix some Alert usage by replacing .alert-{severity} by .theme-{severity} (#42209)
1 parent daa5309 commit 7f53421

4 files changed

Lines changed: 14 additions & 12 deletions

File tree

js/tests/visual/alert.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
<div class="container">
1111
<h1>Alert <small>Bootstrap Visual Test</small></h1>
1212

13-
<div class="alert alert-warning alert-dismissible fade show" role="alert">
13+
<div class="alert theme-warning alert-dismissible fade show" role="alert">
1414
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
1515
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
1616
</div>
1717

18-
<div class="alert alert-danger alert-dismissible fade show" role="alert">
18+
<div class="alert theme-danger alert-dismissible fade show" role="alert">
1919
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
2020
<p>
2121
<strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
@@ -26,7 +26,7 @@ <h1>Alert <small>Bootstrap Visual Test</small></h1>
2626
</p>
2727
</div>
2828

29-
<div class="alert alert-danger alert-dismissible fade show" role="alert">
29+
<div class="alert theme-danger alert-dismissible fade show" role="alert">
3030
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
3131
<p>
3232
<strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
@@ -37,7 +37,7 @@ <h1>Alert <small>Bootstrap Visual Test</small></h1>
3737
</p>
3838
</div>
3939

40-
<div class="alert alert-warning alert-dismissible fade show" role="alert" style="transition-duration: 5s;">
40+
<div class="alert theme-warning alert-dismissible fade show" role="alert" style="transition-duration: 5s;">
4141
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
4242
This alert will take 5 seconds to fade out.
4343
</div>

js/tests/visual/dropdown-submenu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<div class="container py-4">
4747
<h1 class="mb-4">Dropdown Submenus <small class="text-body-secondary">Bootstrap Visual Test</small></h1>
4848

49-
<div class="alert alert-info">
49+
<div class="alert theme-info">
5050
<strong>Keyboard Navigation:</strong>
5151
<span class="keyboard-hint"></span> <span class="keyboard-hint"></span> navigate items,
5252
<span class="keyboard-hint"></span> enter submenu,

site/src/assets/examples/cheatsheet/index.astro

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,18 +651,20 @@ export const body_class = 'bg-body-tertiary'
651651

652652
<div>
653653
<Example showMarkup={false} code={getData('theme-colors').map((themeColor) => `
654-
<div class="alert alert-${themeColor.name} alert-dismissible fade show" role="alert">
654+
<div class="alert theme-${themeColor.name} alert-dismissible fade show mb-3" role="alert">
655655
A simple ${themeColor.name} alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
656656
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
657657
</div>
658658
`)} />
659659

660660
<Example showMarkup={false} code={`
661-
<div class="alert alert-success" role="alert">
662-
<h4 class="alert-heading">Well done!</h4>
663-
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
664-
<hr>
665-
<p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
661+
<div class="alert theme-success" role="alert">
662+
<vstack>
663+
<h4 class="alert-heading">Well done!</h4>
664+
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
665+
<hr>
666+
<p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
667+
</vstack>
666668
</div>
667669
`} />
668670
</div>

site/src/content/docs/components/offcanvas.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ To make a responsive offcanvas, replace the `.offcanvas` base class with a respo
151151

152152
<Example code={`<button class="btn-solid theme-primary d-lg-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasResponsive" aria-controls="offcanvasResponsive">Toggle offcanvas</button>
153153
154-
<div class="alert alert-info d-none d-lg-block">Resize your browser to show the responsive offcanvas toggle.</div>
154+
<div class="alert theme-info d-none d-lg-block">Resize your browser to show the responsive offcanvas toggle.</div>
155155
156156
<div class="offcanvas-lg offcanvas-end" tabindex="-1" id="offcanvasResponsive" aria-labelledby="offcanvasResponsiveLabel">
157157
<div class="offcanvas-header">

0 commit comments

Comments
 (0)