You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/components/placeholders.md
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,17 @@ other_frameworks: placeholder
14
14
15
15
## About
16
16
17
-
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.
17
+
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.
18
18
19
19
## Example
20
20
21
-
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.
22
-
21
+
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.
@@ -79,9 +78,10 @@ In the example below, we take a typical card component and recreate it with plac
79
78
80
79
## How it works
81
80
82
-
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.
81
+
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.
82
+
83
+
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.
83
84
84
-
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.
85
85
86
86
{{< example >}}
87
87
<paria-hidden="true">
@@ -92,12 +92,12 @@ We apply additional styling to `.btn`s via `::before` to ensure the `height` is
92
92
{{< /example >}}
93
93
94
94
{{< callout info >}}
95
-
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 placeholderand inform AT users of the update.
95
+
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.
96
96
{{< /callout >}}
97
97
98
98
### Width
99
99
100
-
You can change the `width`through grid column classes, width utilities, or inline styles.
100
+
You can adjust the `width`using grid column classes, width utilities, or inline styles.
101
101
102
102
{{< example >}}
103
103
<spanclass="placeholder col-6"></span>
@@ -107,7 +107,7 @@ You can change the `width` through grid column classes, width utilities, or inli
107
107
108
108
### Color
109
109
110
-
By default, the `placeholder` uses `currentColor`. This can be overridden with a custom color or utility class.
110
+
By default, the `placeholder` uses `currentColor`, but this can be replaced with a custom color or utility class.
111
111
112
112
{{< example >}}
113
113
<spanclass="placeholder col-12"></span>
@@ -120,7 +120,7 @@ By default, the `placeholder` uses `currentColor`. This can be overridden with a
120
120
121
121
### Sizing
122
122
123
-
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`.
123
+
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`.
0 commit comments