mirror of
https://github.com/primer/css.git
synced 2025-01-01 18:53:34 +03:00
Replace animated-ellipsis with AnimatedEllipsis
This commit is contained in:
parent
83f1f9797e
commit
1bb86e9a6e
@ -8,12 +8,19 @@ bundle: loaders
|
|||||||
|
|
||||||
Loaders inform users that an action is still in progress and might take a while to complete.
|
Loaders inform users that an action is still in progress and might take a while to complete.
|
||||||
|
|
||||||
## Animated ellipsis
|
## Animated Ellipsis
|
||||||
|
|
||||||
The `.animated-ellipsis` can be used for any kind of text to add an animated ellipsis.
|
|
||||||
|
|
||||||
|
Add an animated ellipsis at the end of text with `<span class="AnimatedEllipsis"></span>`.
|
||||||
|
|
||||||
```html live
|
```html live
|
||||||
<span>Loading</span>
|
<span>Loading</span><span class="AnimatedEllipsis"></span>
|
||||||
<span class="animated-ellipsis-container"><span class="animated-ellipsis">...</span></span>
|
```
|
||||||
|
|
||||||
|
It can also be used in combination with other components.
|
||||||
|
|
||||||
|
```html live
|
||||||
|
<h2><span>Loading</span><span class="AnimatedEllipsis"></span></h2>
|
||||||
|
<span class="branch-name mt-2"><span>Loading</span><span class="AnimatedEllipsis"></span></span><br>
|
||||||
|
<span class="Label bg-blue mt-3"><span>Loading</span><span class="AnimatedEllipsis"></span></span><br>
|
||||||
|
<button class="btn mt-3"><span>Loading</span><span class="AnimatedEllipsis"></span></button>
|
||||||
```
|
```
|
||||||
|
@ -2,30 +2,18 @@
|
|||||||
|
|
||||||
// Animated Ellipsis
|
// Animated Ellipsis
|
||||||
|
|
||||||
.animated-ellipsis-container {
|
.AnimatedEllipsis {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 12px;
|
overflow: hidden;
|
||||||
height: 12px;
|
vertical-align: bottom;
|
||||||
// TODO@14.0.0: Remove `overflow: visible`. Used to override styleguide.css
|
|
||||||
overflow: visible;
|
|
||||||
transform: translateZ(0);
|
|
||||||
|
|
||||||
> .animated-ellipsis {
|
&::after {
|
||||||
|
content: "...";
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
animation: AnimatedEllipsis-keyframes 1.2s steps(4,jump-none) infinite;
|
||||||
vertical-align: bottom;
|
}
|
||||||
animation: ellipsis 1s infinite;
|
|
||||||
|
@keyframes AnimatedEllipsis-keyframes {
|
||||||
|
0% { transform: translateX(-100%); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes ellipsis {
|
|
||||||
from { width: 2px; }
|
|
||||||
|
|
||||||
to { width: 12px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.large-loading-area {
|
|
||||||
// stylelint-disable-next-line primer/variables
|
|
||||||
padding: 100px 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user