Skip to content

Commit 4e370c1

Browse files
committed
v6: examples - Use new utility classes in examples
Update multiple example pages to new utility naming and tokens for consistency. Replaced legacy text-*/display-*/bg-* classes with fg-*/fs-* and bg-subtle-* variants, adjusted spacing and radii (p-5 → p-9, rounded-3 → rounded-5), removed redundant text-small classes, and applied small/fg-white tweaks where appropriate. Files changed: checkout, headers, jumbotron, pricing, product, and sidebars examples to align markup with the updated design system.
1 parent 1b57f4c commit 4e370c1

6 files changed

Lines changed: 52 additions & 52 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export const body_class = 'bg-body-tertiary'
232232
</div>
233233
</main>
234234

235-
<footer class="my-5 pt-5 fg-2 text-center text-small">
235+
<footer class="my-5 pt-5 fg-2 text-center small">
236236
<p class="mb-1">&copy; 2017–{new Date().getFullYear()} Company Name</p>
237237
<ul class="list-inline">
238238
<li class="list-inline-item"><a href="#">Privacy</a></li>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const extra_css = ['headers.css']
139139
<a href="#" class="d-block link-body-emphasis text-decoration-none" data-bs-toggle="menu" aria-expanded="false">
140140
<img src="https://github.com/mdo.png" alt="mdo" width="32" height="32" class="rounded-circle">
141141
</a>
142-
<div class="menu text-small">
142+
<div class="menu">
143143
<a class="menu-item" href="#">New project...</a>
144144
<a class="menu-item" href="#">Settings</a>
145145
<a class="menu-item" href="#">Profile</a>
@@ -159,7 +159,7 @@ export const extra_css = ['headers.css']
159159
<a href="#" class="d-flex align-items-center lg:col-4 mb-2 lg:mb-0 link-body-emphasis text-decoration-none" data-bs-toggle="menu" aria-expanded="false" aria-label="Bootstrap menu">
160160
<svg class="bi me-2" width="40" height="32" aria-hidden="true"><use href="#bootstrap"/></svg>
161161
</a>
162-
<div class="menu text-small shadow">
162+
<div class="menu shadow">
163163
<a class="menu-item active" href="#" aria-current="page">Overview</a>
164164
<a class="menu-item" href="#">Inventory</a>
165165
<a class="menu-item" href="#">Customers</a>
@@ -179,7 +179,7 @@ export const extra_css = ['headers.css']
179179
<a href="#" class="d-block link-body-emphasis text-decoration-none" data-bs-toggle="menu" aria-expanded="false">
180180
<img src="https://github.com/mdo.png" alt="mdo" width="32" height="32" class="rounded-circle">
181181
</a>
182-
<div class="menu text-small shadow">
182+
<div class="menu shadow">
183183
<a class="menu-item" href="#">New project...</a>
184184
<a class="menu-item" href="#">Settings</a>
185185
<a class="menu-item" href="#">Profile</a>
@@ -241,7 +241,7 @@ export const extra_css = ['headers.css']
241241
<svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"><use href="#bootstrap"/></svg>
242242
</a>
243243

244-
<ul class="nav col-12 lg:col-auto my-2 justify-content-center md:my-0 text-small">
244+
<ul class="nav col-12 lg:col-auto my-2 justify-content-center md:my-0">
245245
<li>
246246
<a href="#" class="nav-link fg-secondary flex-column">
247247
<svg class="bi d-block mx-auto" width="24" height="24" aria-hidden="true"><use href="#home"/></svg>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export const title = 'Jumbotron example'
55
<main>
66
<div class="container py-4">
77
<header class="pb-3 mb-4 border-bottom">
8-
<a href="/" class="d-flex align-items-center text-body-emphasis text-decoration-none">
8+
<a href="/" class="d-flex align-items-center fg-emphasis-secondary text-decoration-none">
99
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg>
1010
<span class="fs-xl">Jumbotron example</span>
1111
</a>
1212
</header>
1313

14-
<div class="p-5 mb-4 bg-body-tertiary rounded-3">
14+
<div class="p-9 mb-4 bg-subtle-secondary rounded-5">
1515
<div class="container-fluid py-5">
1616
<h1 class="display-5 fw-bold">Custom jumbotron</h1>
1717
<p class="md:col-8 fs-xl">Using a series of utilities, you can create this jumbotron, just like the one in previous versions of Bootstrap. Check out the examples below for how you can remix and restyle it to your liking.</p>
@@ -21,14 +21,14 @@ export const title = 'Jumbotron example'
2121

2222
<div class="row md:align-items-stretch">
2323
<div class="md:col-6">
24-
<div class="h-100 p-5 text-bg-dark rounded-3">
24+
<div class="h-100 p-9 bg-black fg-white rounded-5" data-bs-theme="dark">
2525
<h2>Change the background</h2>
26-
<p>Swap the background-color utility and add a `.text-*` color utility to mix up the jumbotron look. Then, mix and match with additional component themes and more.</p>
27-
<button class="btn-outline theme-secondary" type="button">Example button</button>
26+
<p>Swap the background-color utility and add a `.fg-*` color utility to mix up the jumbotron look. Then, mix and match with additional component themes and more.</p>
27+
<button class="btn-outline theme-secondary fg-white" type="button">Example button</button>
2828
</div>
2929
</div>
3030
<div class="md:col-6">
31-
<div class="h-100 p-5 bg-body-tertiary border rounded-3">
31+
<div class="h-100 p-9 bg-body-tertiary border rounded-5">
3232
<h2>Add borders</h2>
3333
<p>Or, keep it light and add a border for some added definition to the boundaries of your content. Be sure to look under the hood at the source HTML here as we've adjusted the alignment and sizing of both column's content for equal-height.</p>
3434
<button class="btn-outline theme-secondary" type="button">Example button</button>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export const extra_css = ['pricing.css']
154154
</div>
155155
<div class="col-6 md:col">
156156
<h5>Features</h5>
157-
<ul class="list-unstyled text-small">
157+
<ul class="list-unstyled">
158158
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Cool stuff</a></li>
159159
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Random feature</a></li>
160160
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Team feature</a></li>
@@ -165,7 +165,7 @@ export const extra_css = ['pricing.css']
165165
</div>
166166
<div class="col-6 md:col">
167167
<h5>Resources</h5>
168-
<ul class="list-unstyled text-small">
168+
<ul class="list-unstyled">
169169
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Resource</a></li>
170170
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Resource name</a></li>
171171
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Another resource</a></li>
@@ -174,7 +174,7 @@ export const extra_css = ['pricing.css']
174174
</div>
175175
<div class="col-6 md:col">
176176
<h5>About</h5>
177-
<ul class="list-unstyled text-small">
177+
<ul class="list-unstyled">
178178
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Team</a></li>
179179
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Locations</a></li>
180180
<li class="mb-1"><a class="theme-secondary text-decoration-none" href="#">Privacy</a></li>

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

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ export const extra_css = ['product.css']
5151
</nav>
5252

5353
<main>
54-
<div class="position-relative overflow-hidden p-3 md:p-5 md:m-3 text-center bg-body-tertiary">
55-
<div class="md:col-6 lg:p-5 mx-auto my-5">
56-
<h1 class="display-3 fw-bold">Designed for engineers</h1>
57-
<h3 class="fw-normal fg-secondary mb-3">Build anything you want with Aperture</h3>
54+
<div class="position-relative overflow-hidden p-5 md:p-9 md:m-3 text-center bg-subtle-secondary">
55+
<div class="md:col-6 lg:p-9 mx-auto my-9">
56+
<h1 class="fs-5xl fw-bold">Designed for engineers</h1>
57+
<h3 class="fw-normal fg-secondary mb-3 text-pretty">Build anything you want with Aperture</h3>
5858
<div class="d-flex gap-3 justify-content-center lead fw-normal">
5959
<a class="icon-link" href="#">
6060
Learn more
@@ -71,67 +71,67 @@ export const extra_css = ['product.css']
7171
</div>
7272

7373
<div class="md:d-flex md:flex-equal w-100 md:my-3 md:ps-3">
74-
<div class="text-bg-dark md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
75-
<div class="my-3 py-3">
76-
<h2 class="display-5">Another headline</h2>
74+
<div class="bg-black fg-white md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
75+
<div class="my-5 py-5">
76+
<h2 class="fs-3xl fw-light">Another headline</h2>
7777
<p class="lead">And an even wittier subheading.</p>
7878
</div>
79-
<div class="bg-body-tertiary shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
79+
<div class="bg-subtle-secondary shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
8080
</div>
81-
<div class="bg-body-tertiary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
82-
<div class="my-3 p-3">
83-
<h2 class="display-5">Another headline</h2>
81+
<div class="bg-subtle-secondary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
82+
<div class="my-5 p-5">
83+
<h2 class="fs-3xl fw-light">Another headline</h2>
8484
<p class="lead">And an even wittier subheading.</p>
8585
</div>
86-
<div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
86+
<div class="bg-black shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
8787
</div>
8888
</div>
8989

9090
<div class="md:d-flex md:flex-equal w-100 md:my-3 md:ps-3">
91-
<div class="bg-body-tertiary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
92-
<div class="my-3 p-3">
93-
<h2 class="display-5">Another headline</h2>
91+
<div class="bg-subtle-secondary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
92+
<div class="my-5 p-5">
93+
<h2 class="fs-3xl fw-light">Another headline</h2>
9494
<p class="lead">And an even wittier subheading.</p>
9595
</div>
96-
<div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
96+
<div class="bg-black shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
9797
</div>
9898
<div class="theme-primary theme-contrast md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
99-
<div class="my-3 py-3">
100-
<h2 class="display-5">Another headline</h2>
99+
<div class="my-5 py-5">
100+
<h2 class="fs-3xl fw-light">Another headline</h2>
101101
<p class="lead">And an even wittier subheading.</p>
102102
</div>
103-
<div class="bg-body-tertiary shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
103+
<div class="bg-subtle-secondary shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
104104
</div>
105105
</div>
106106

107107
<div class="md:d-flex md:flex-equal w-100 md:my-3 md:ps-3">
108-
<div class="bg-body-tertiary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
109-
<div class="my-3 p-3">
110-
<h2 class="display-5">Another headline</h2>
108+
<div class="bg-subtle-secondary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
109+
<div class="my-5 p-5">
110+
<h2 class="fs-3xl fw-light">Another headline</h2>
111111
<p class="lead">And an even wittier subheading.</p>
112112
</div>
113113
<div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
114114
</div>
115-
<div class="bg-body-tertiary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
116-
<div class="my-3 py-3">
117-
<h2 class="display-5">Another headline</h2>
115+
<div class="bg-subtle-secondary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
116+
<div class="my-5 py-5">
117+
<h2 class="fs-3xl fw-light">Another headline</h2>
118118
<p class="lead">And an even wittier subheading.</p>
119119
</div>
120120
<div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
121121
</div>
122122
</div>
123123

124124
<div class="md:d-flex md:flex-equal w-100 md:my-3 md:ps-3">
125-
<div class="bg-body-tertiary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
126-
<div class="my-3 p-3">
127-
<h2 class="display-5">Another headline</h2>
125+
<div class="bg-subtle-secondary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
126+
<div class="my-5 p-5">
127+
<h2 class="fs-3xl fw-light">Another headline</h2>
128128
<p class="lead">And an even wittier subheading.</p>
129129
</div>
130130
<div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
131131
</div>
132-
<div class="bg-body-tertiary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
133-
<div class="my-3 py-3">
134-
<h2 class="display-5">Another headline</h2>
132+
<div class="bg-subtle-secondary md:me-3 pt-3 px-3 md:pt-5 md:px-5 text-center overflow-hidden">
133+
<div class="my-5 py-5">
134+
<h2 class="fs-3xl fw-light">Another headline</h2>
135135
<p class="lead">And an even wittier subheading.</p>
136136
</div>
137137
<div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div>
@@ -147,7 +147,7 @@ export const extra_css = ['product.css']
147147
</div>
148148
<div class="col-6 md:col">
149149
<h5>Features</h5>
150-
<ul class="list-unstyled text-small">
150+
<ul class="list-unstyled">
151151
<li><a class="theme-secondary text-decoration-none" href="#">Cool stuff</a></li>
152152
<li><a class="theme-secondary text-decoration-none" href="#">Random feature</a></li>
153153
<li><a class="theme-secondary text-decoration-none" href="#">Team feature</a></li>
@@ -158,7 +158,7 @@ export const extra_css = ['product.css']
158158
</div>
159159
<div class="col-6 md:col">
160160
<h5>Resources</h5>
161-
<ul class="list-unstyled text-small">
161+
<ul class="list-unstyled">
162162
<li><a class="theme-secondary text-decoration-none" href="#">Resource name</a></li>
163163
<li><a class="theme-secondary text-decoration-none" href="#">Resource</a></li>
164164
<li><a class="theme-secondary text-decoration-none" href="#">Another resource</a></li>
@@ -167,7 +167,7 @@ export const extra_css = ['product.css']
167167
</div>
168168
<div class="col-6 md:col">
169169
<h5>Resources</h5>
170-
<ul class="list-unstyled text-small">
170+
<ul class="list-unstyled">
171171
<li><a class="theme-secondary text-decoration-none" href="#">Business</a></li>
172172
<li><a class="theme-secondary text-decoration-none" href="#">Education</a></li>
173173
<li><a class="theme-secondary text-decoration-none" href="#">Government</a></li>
@@ -176,7 +176,7 @@ export const extra_css = ['product.css']
176176
</div>
177177
<div class="col-6 md:col">
178178
<h5>About</h5>
179-
<ul class="list-unstyled text-small">
179+
<ul class="list-unstyled">
180180
<li><a class="theme-secondary text-decoration-none" href="#">Team</a></li>
181181
<li><a class="theme-secondary text-decoration-none" href="#">Locations</a></li>
182182
<li><a class="theme-secondary text-decoration-none" href="#">Privacy</a></li>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const extra_js = [{src: 'sidebars.js'}]
7575
<img src="https://github.com/mdo.png" alt="" width="32" height="32" class="rounded-circle me-2">
7676
<strong>mdo</strong>
7777
</a>
78-
<div class="menu text-small shadow">
78+
<div class="menu shadow">
7979
<a class="menu-item" href="#">New project...</a>
8080
<a class="menu-item" href="#">Settings</a>
8181
<a class="menu-item" href="#">Profile</a>
@@ -131,7 +131,7 @@ export const extra_js = [{src: 'sidebars.js'}]
131131
<img src="https://github.com/mdo.png" alt="" width="32" height="32" class="rounded-circle me-2">
132132
<strong>mdo</strong>
133133
</a>
134-
<div class="menu text-small shadow">
134+
<div class="menu shadow">
135135
<a class="menu-item" href="#">New project...</a>
136136
<a class="menu-item" href="#">Settings</a>
137137
<a class="menu-item" href="#">Profile</a>
@@ -179,7 +179,7 @@ export const extra_js = [{src: 'sidebars.js'}]
179179
<a href="#" class="d-flex align-items-center justify-content-center p-3 link-body-emphasis text-decoration-none" data-bs-toggle="menu" aria-expanded="false">
180180
<img src="https://github.com/mdo.png" alt="mdo" width="24" height="24" class="rounded-circle">
181181
</a>
182-
<div class="menu text-small shadow">
182+
<div class="menu shadow">
183183
<a class="menu-item" href="#">New project...</a>
184184
<a class="menu-item" href="#">Settings</a>
185185
<a class="menu-item" href="#">Profile</a>

0 commit comments

Comments
 (0)