Skip to content

Commit f20a806

Browse files
committed
docs: update content
1 parent 1a1dc94 commit f20a806

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/content/components/placeholders.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ other_frameworks: placeholder
1111

1212
## About
1313

14-
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.
14+
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.
1515

1616
## Example
1717

18-
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.
19-
18+
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.
2019
<div class="docs-example docs-example-placeholder-cards d-flex justify-content-around">
2120
<div class="card">
2221
{{< placeholder width="100%" height="180" class="card-img-top" text="false" background="#20c997" >}}
2322
<div class="card-body">
24-
<h5 class="card-title">Card title</h5>
25-
<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>
23+
<h5 class="card-title">Bootstrap card title</h5>
24+
<p class="card-text">Some brief example text to expand on the card title and form most of the card's content.</p>
2625
<a href="#" class="btn btn-primary">Go somewhere</a>
2726
</div>
2827
</div>
@@ -50,8 +49,8 @@ In the example below, we take a typical card component and recreate it with plac
5049
<img src="..." class="card-img-top" alt="...">
5150

5251
<div class="card-body">
53-
<h5 class="card-title">Card title</h5>
54-
<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>
52+
<h5 class="card-title">Bootstrap card title</h5>
53+
<p class="card-text">Some brief example text to expand on the card title and form most of the card's content.</p>
5554
<a href="#" class="btn btn-primary">Go somewhere</a>
5655
</div>
5756
</div>
@@ -76,9 +75,10 @@ In the example below, we take a typical card component and recreate it with plac
7675

7776
## How it works
7877

79-
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.
78+
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.
79+
80+
To ensure the `height` is maintained, we style `.btn`s with `::before`. This pattern can be expanded for other cases or a `&nbsp;` can be added inside the element to match the height when actual text appears.
8081

81-
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 `&nbsp;` within the element to reflect the height when actual text is rendered in its place.
8282

8383
{{< example >}}
8484
<p aria-hidden="true">
@@ -89,12 +89,12 @@ We apply additional styling to `.btn`s via `::before` to ensure the `height` is
8989
{{< /example >}}
9090

9191
{{< callout info >}}
92-
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.
92+
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.
9393
{{< /callout >}}
9494

9595
### Width
9696

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

9999
{{< example >}}
100100
<span class="placeholder col-6"></span>
@@ -104,7 +104,7 @@ You can change the `width` through grid column classes, width utilities, or inli
104104

105105
### Color
106106

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

109109
{{< example >}}
110110
<span class="placeholder col-12"></span>
@@ -117,7 +117,7 @@ By default, the `placeholder` uses `currentColor`. This can be overridden with a
117117

118118
### Sizing
119119

120-
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`.
120+
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`.
121121

122122
{{< example >}}
123123
<span class="placeholder col-12 placeholder-lg"></span>
@@ -128,7 +128,7 @@ The size of `.placeholder`s are based on the typographic style of the parent ele
128128

129129
### Animation
130130

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

133133
{{< example >}}
134134
<p class="placeholder-glow">

0 commit comments

Comments
 (0)