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
@@ -11,18 +11,17 @@ other_frameworks: placeholder
11
11
12
12
## About
13
13
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.
15
15
16
16
## Example
17
17
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.
@@ -76,9 +75,10 @@ In the example below, we take a typical card component and recreate it with plac
76
75
77
76
## How it works
78
77
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 ` ` can be added inside the element to match the height when actual text appears.
80
81
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 ` ` within the element to reflect the height when actual text is rendered in its place.
82
82
83
83
{{< example >}}
84
84
<paria-hidden="true">
@@ -89,12 +89,12 @@ We apply additional styling to `.btn`s via `::before` to ensure the `height` is
89
89
{{< /example >}}
90
90
91
91
{{< 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 placeholderand 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.
93
93
{{< /callout >}}
94
94
95
95
### Width
96
96
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.
98
98
99
99
{{< example >}}
100
100
<spanclass="placeholder col-6"></span>
@@ -104,7 +104,7 @@ You can change the `width` through grid column classes, width utilities, or inli
104
104
105
105
### Color
106
106
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.
108
108
109
109
{{< example >}}
110
110
<spanclass="placeholder col-12"></span>
@@ -117,7 +117,7 @@ By default, the `placeholder` uses `currentColor`. This can be overridden with a
117
117
118
118
### Sizing
119
119
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`.
0 commit comments