Skip to content

Commit 5ef896c

Browse files
committed
docs: update content
1 parent cfad22e commit 5ef896c

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

bootstrap/docs/components/placeholders/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,16 +1230,16 @@ <h2>Other frameworks</h2>
12301230

12311231

12321232
<h2 id="about">About <a class="anchor-link" href="#about" aria-label="Link to this section: About"></a></h2>
1233-
<p>Placeholders can be used to enhance the experience of your application. They&rsquo;re built only with HTML and CSS, meaning you don&rsquo;t need any JavaScript to create them. You will, however, need some custom JavaScript to toggle their visibility. Their appearance, color, and sizing can be easily customized with our utility classes.</p>
1233+
<p>Bootstrap placeholders can enhance your application&rsquo;s user experience. They&rsquo;re built exclusively with HTML and CSS, so you don&rsquo;t need any JavaScript to create them. However, you&rsquo;ll require some custom JavaScript to toggle their visibility. Their appearance, color, and size can be easily customized using our utility classes.</p>
12341234
<h2 id="example">Example <a class="anchor-link" href="#example" aria-label="Link to this section: Example"></a></h2>
1235-
<p>In the example below, we take a typical card component and recreate it with placeholders applied to create a &ldquo;loading card&rdquo;. Size and proportions are the same between the two.</p>
1235+
<p>In the example below, we use the Bootstrap card component and modify it with placeholders to form a &ldquo;loading card.&rdquo; The size and proportions remain consistent between the two.</p>
12361236
<div class="docs-example docs-example-placeholder-cards d-flex justify-content-around">
12371237
<div class="card">
12381238
<svg class="docs-placeholder-img card-img-top" width="100%" height="180" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#20c997"/></svg>
12391239

12401240
<div class="card-body">
1241-
<h5 class="card-title">Card title</h5>
1242-
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
1241+
<h5 class="card-title">Bootstrap card title</h5>
1242+
<p class="card-text">Some brief example text to expand on the card title and form most of the card's content.</p>
12431243
<a href="#" class="btn btn-primary">Go somewhere</a>
12441244
</div>
12451245
</div>
@@ -1265,8 +1265,8 @@ <h5 class="card-title">Card title</h5>
12651265
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&#34;...&#34;</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;card-img-top&#34;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&#34;...&#34;</span><span class="p">&gt;</span>
12661266
</span></span><span class="line"><span class="cl">
12671267
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;card-body&#34;</span><span class="p">&gt;</span>
1268-
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">h5</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;card-title&#34;</span><span class="p">&gt;</span>Card title<span class="p">&lt;/</span><span class="nt">h5</span><span class="p">&gt;</span>
1269-
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">p</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;card-text&#34;</span><span class="p">&gt;</span>Some quick example text to build on the card title and make up the bulk of the card&#39;s content.<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
1268+
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">h5</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;card-title&#34;</span><span class="p">&gt;</span>Bootstrap card title<span class="p">&lt;/</span><span class="nt">h5</span><span class="p">&gt;</span>
1269+
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">p</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;card-text&#34;</span><span class="p">&gt;</span>Some brief example text to expand on the card title and form most of the card&#39;s content.<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
12701270
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;#&#34;</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;btn btn-primary&#34;</span><span class="p">&gt;</span>Go somewhere<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
12711271
</span></span><span class="line"><span class="cl"> <span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
12721272
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
@@ -1288,8 +1288,8 @@ <h5 class="card-title">Card title</h5>
12881288
</span></span><span class="line"><span class="cl"> <span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
12891289
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
12901290
</span></span></code></pre></div><h2 id="how-it-works">How it works <a class="anchor-link" href="#how-it-works" aria-label="Link to this section: How it works"></a></h2>
1291-
<p>Create placeholders with the <code>.placeholder</code> class and a grid column class (e.g., <code>.col-6</code>) to set the <code>width</code>. They can replace the text inside an element or be added as a modifier class to an existing component.</p>
1292-
<p>We apply additional styling to <code>.btn</code>s via <code>::before</code> to ensure the <code>height</code> is respected. You may extend this pattern for other situations as needed, or add a <code>&amp;nbsp;</code> within the element to reflect the height when actual text is rendered in its place.</p>
1291+
<p>Create placeholders using the <code>.placeholder</code> class along with a grid column class (e.g., <code>.col-6</code>) to define the <code>width</code>. These placeholders can either replace text inside an element or be added as a modifier class to an existing component.</p>
1292+
<p>To ensure the <code>height</code> is maintained, we style <code>.btn</code>s with <code>::before</code>. This pattern can be expanded for other cases or a <code>&amp;nbsp;</code> can be added inside the element to match the height when actual text appears.</p>
12931293
<div class="docs-example-snippet docs-code-snippet"><div class="docs-example m-0 border-0">
12941294
<p aria-hidden="true">
12951295
<span class="placeholder col-6"></span>
@@ -1317,10 +1317,10 @@ <h5 class="card-title">Card title</h5>
13171317
</span></span><span class="line"><span class="cl">
13181318
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;btn btn-primary disabled placeholder col-4&#34;</span> <span class="na">aria-disabled</span><span class="o">=</span><span class="s">&#34;true&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span></code></pre></div></div>
13191319
<div class="docs-callout docs-callout-info">
1320-
The use of <code>aria-hidden=&quot;true&quot;</code> only indicates that the element should be hidden to screen readers. The <em>loading</em> behavior of the placeholder depends on how authors will actually use the placeholder styles, how they plan to update things, etc. Some JavaScript code may be needed to <em>swap</em> the state of the placeholder and inform AT users of the update.
1320+
Using <code>aria-hidden=&quot;true&quot;</code> simply tells screen readers to ignore the element. The actual <em>loading</em> behavior of the placeholder depends on how authors implement and style the placeholder, as well as how they update it. Some JavaScript may be necessary to <em>toggle</em> the placeholder&rsquo;s state and notify AT users of the change.
13211321
</div>
13221322
<h3 id="width">Width <a class="anchor-link" href="#width" aria-label="Link to this section: Width"></a></h3>
1323-
<p>You can change the <code>width</code> through grid column classes, width utilities, or inline styles.</p>
1323+
<p>You can adjust the <code>width</code> using grid column classes, width utilities, or inline styles.</p>
13241324
<div class="docs-example-snippet docs-code-snippet"><div class="docs-example m-0 border-0">
13251325
<span class="placeholder col-6"></span>
13261326
<span class="placeholder w-75"></span>
@@ -1344,7 +1344,7 @@ <h3 id="width">Width <a class="anchor-link" href="#width" aria-label="Link to th
13441344
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;placeholder w-75&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">span</span><span class="p">&gt;</span>
13451345
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;placeholder&#34;</span> <span class="na">style</span><span class="o">=</span><span class="s">&#34;width: 25%;&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span></code></pre></div></div>
13461346
<h3 id="color">Color <a class="anchor-link" href="#color" aria-label="Link to this section: Color"></a></h3>
1347-
<p>By default, the <code>placeholder</code> uses <code>currentColor</code>. This can be overridden with a custom color or utility class.</p>
1347+
<p>By default, the <code>placeholder</code> uses <code>currentColor</code>, but this can be replaced with a custom color or utility class.</p>
13481348
<div class="docs-example-snippet docs-code-snippet"><div class="docs-example m-0 border-0">
13491349
<span class="placeholder col-12"></span>
13501350

@@ -1382,7 +1382,7 @@ <h3 id="color">Color <a class="anchor-link" href="#color" aria-label="Link to th
13821382
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;placeholder col-12 bg-light&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">span</span><span class="p">&gt;</span>
13831383
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;placeholder col-12 bg-dark&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span></code></pre></div></div>
13841384
<h3 id="sizing">Sizing <a class="anchor-link" href="#sizing" aria-label="Link to this section: Sizing"></a></h3>
1385-
<p>The size of <code>.placeholder</code>s are based on the typographic style of the parent element. Customize them with sizing modifiers: <code>.placeholder-lg</code>, <code>.placeholder-sm</code>, or <code>.placeholder-xs</code>.</p>
1385+
<p>The size of <code>.placeholder</code>s depends on the typographic style of the parent element. Customize them with size modifiers: <code>.placeholder-lg</code>, <code>.placeholder-sm</code>, or <code>.placeholder-xs</code>.</p>
13861386
<div class="docs-example-snippet docs-code-snippet"><div class="docs-example m-0 border-0">
13871387
<span class="placeholder col-12 placeholder-lg"></span>
13881388
<span class="placeholder col-12"></span>
@@ -1408,7 +1408,7 @@ <h3 id="sizing">Sizing <a class="anchor-link" href="#sizing" aria-label="Link to
14081408
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;placeholder col-12 placeholder-sm&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">span</span><span class="p">&gt;</span>
14091409
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;placeholder col-12 placeholder-xs&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span></code></pre></div></div>
14101410
<h3 id="animation">Animation <a class="anchor-link" href="#animation" aria-label="Link to this section: Animation"></a></h3>
1411-
<p>Animate placeholders with <code>.placeholder-glow</code> or <code>.placeholder-wave</code> to better convey the perception of something being <em>actively</em> loaded.</p>
1411+
<p>Animate Bootstrap placeholders using <code>.placeholder-glow</code> or <code>.placeholder-wave</code> to visually suggest that content is <em>actively</em> loading.</p>
14121412
<div class="docs-example-snippet docs-code-snippet"><div class="docs-example m-0 border-0">
14131413
<p class="placeholder-glow">
14141414
<span class="placeholder col-12"></span>

bootstrap/docs/components/placeholders/llm.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@ Use loading placeholders for your components or pages to indicate something may
66

77
## Bootstrap 5 Placeholders – About
88

9-
Placeholders can be used to enhance the experience of your application. They're built only with HTML and CSS, meaning you don't need any JavaScript to create them. You will, however, need some custom JavaScript to toggle their visibility. Their appearance, color, and sizing can be easily customized with our utility classes.
9+
Bootstrap placeholders can enhance your application's user experience. They're built exclusively with HTML and CSS, so you don't need any JavaScript to create them. However, you'll require some custom JavaScript to toggle their visibility. Their appearance, color, and size can be easily customized using our utility classes.
1010

1111
## Bootstrap 5 Placeholders – Example
1212

13-
In the example below, we take a typical card component and recreate it with placeholders applied to create a "loading card". Size and proportions are the same between the two.
14-
13+
In the example below, we use the Bootstrap card component and modify it with placeholders to form a "loading card." The size and proportions remain consistent between the two.
1514
<div class="docs-example docs-example-placeholder-cards d-flex justify-content-around">
1615
<div class="card">
1716
<svg class="docs-placeholder-img card-img-top" width="100%" height="180" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#20c997"/></svg>
1817

1918
<div class="card-body">
20-
<h5 class="card-title">Card title</h5>
21-
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
19+
<h5 class="card-title">Bootstrap card title</h5>
20+
<p class="card-text">Some brief example text to expand on the card title and form most of the card's content.</p>
2221
<a href="#" class="btn btn-primary">Go somewhere</a>
2322
</div>
2423
</div>
@@ -47,8 +46,8 @@ In the example below, we take a typical card component and recreate it with plac
4746
<img src="..." class="card-img-top" alt="...">
4847

4948
<div class="card-body">
50-
<h5 class="card-title">Card title</h5>
51-
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
49+
<h5 class="card-title">Bootstrap card title</h5>
50+
<p class="card-text">Some brief example text to expand on the card title and form most of the card's content.</p>
5251
<a href="#" class="btn btn-primary">Go somewhere</a>
5352
</div>
5453
</div>
@@ -73,9 +72,10 @@ In the example below, we take a typical card component and recreate it with plac
7372

7473
## Bootstrap 5 Placeholders – How it works
7574

76-
Create placeholders with the `.placeholder` class and a grid column class (e.g., `.col-6`) to set the `width`. They can replace the text inside an element or be added as a modifier class to an existing component.
75+
Create placeholders using the `.placeholder` class along with a grid column class (e.g., `.col-6`) to define the `width`. These placeholders can either replace text inside an element or be added as a modifier class to an existing component.
76+
77+
To ensure the `height` is maintained, we style `.btn`s with `::before`. This pattern can be expanded for other cases or a ` ` can be added inside the element to match the height when actual text appears.
7778

78-
We apply additional styling to `.btn`s via `::before` to ensure the `height` is respected. You may extend this pattern for other situations as needed, or add a ` ` within the element to reflect the height when actual text is rendered in its place.
7979

8080
```html
8181
<p aria-hidden="true">
@@ -86,12 +86,12 @@ We apply additional styling to `.btn`s via `::before` to ensure the `height` is
8686
```
8787

8888

89-
The use of `aria-hidden="true"` only indicates that the element should be hidden to screen readers. The *loading* behavior of the placeholder depends on how authors will actually use the placeholder styles, how they plan to update things, etc. Some JavaScript code may be needed to *swap* the state of the placeholder and inform AT users of the update.
89+
Using `aria-hidden="true"` simply tells screen readers to ignore the element. The actual *loading* behavior of the placeholder depends on how authors implement and style the placeholder, as well as how they update it. Some JavaScript may be necessary to *toggle* the placeholder's state and notify AT users of the change.
9090

9191

9292
### Bootstrap 5 Placeholders – Width
9393

94-
You can change the `width` through grid column classes, width utilities, or inline styles.
94+
You can adjust the `width` using grid column classes, width utilities, or inline styles.
9595

9696
```html
9797
<span class="placeholder col-6"></span>
@@ -101,7 +101,7 @@ You can change the `width` through grid column classes, width utilities, or inli
101101

102102
### Bootstrap 5 Placeholders – Color
103103

104-
By default, the `placeholder` uses `currentColor`. This can be overridden with a custom color or utility class.
104+
By default, the `placeholder` uses `currentColor`, but this can be replaced with a custom color or utility class.
105105

106106
```html
107107
<span class="placeholder col-12"></span>
@@ -118,7 +118,7 @@ By default, the `placeholder` uses `currentColor`. This can be overridden with a
118118

119119
### Bootstrap 5 Placeholders – Sizing
120120

121-
The size of `.placeholder`s are based on the typographic style of the parent element. Customize them with sizing modifiers: `.placeholder-lg`, `.placeholder-sm`, or `.placeholder-xs`.
121+
The size of `.placeholder`s depends on the typographic style of the parent element. Customize them with size modifiers: `.placeholder-lg`, `.placeholder-sm`, or `.placeholder-xs`.
122122

123123
```html
124124
<span class="placeholder col-12 placeholder-lg"></span>
@@ -129,7 +129,7 @@ The size of `.placeholder`s are based on the typographic style of the parent ele
129129

130130
### Bootstrap 5 Placeholders – Animation
131131

132-
Animate placeholders with `.placeholder-glow` or `.placeholder-wave` to better convey the perception of something being _actively_ loaded.
132+
Animate Bootstrap placeholders using `.placeholder-glow` or `.placeholder-wave` to visually suggest that content is _actively_ loading.
133133

134134
```html
135135
<p class="placeholder-glow">

0 commit comments

Comments
 (0)