-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #974 from primer/loaders
Add Animated Ellipsis
- Loading branch information
Showing
6 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Loaders | ||
path: components/loaders | ||
status: New | ||
source: 'https://github.com/primer/css/tree/master/src/loaders' | ||
bundle: loaders | ||
--- | ||
|
||
Loaders inform users that an action is still in progress and might take a while to complete. | ||
|
||
## Animated Ellipsis | ||
|
||
Add an animated ellipsis at the end of text with `<span class="AnimatedEllipsis"></span>`. | ||
|
||
```html live | ||
<span>Loading</span><span class="AnimatedEllipsis"></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" disabled><span>Loading</span><span class="AnimatedEllipsis"></span></button> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
bundle: "loaders" | ||
generated: true | ||
--- | ||
|
||
# Primer CSS: `loaders` bundle | ||
|
||
## Usage | ||
|
||
Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with: | ||
|
||
```scss | ||
@import "@primer/css/loaders/index.scss"; | ||
``` | ||
|
||
## Build | ||
|
||
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/loaders.css`. | ||
|
||
## License | ||
|
||
[MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/) | ||
|
||
|
||
[scss]: https://sass-lang.com/documentation/syntax#scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import "../support/index.scss"; | ||
@import "./loaders.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Loaders | ||
|
||
// Animated Ellipsis | ||
|
||
.AnimatedEllipsis { | ||
display: inline-block; | ||
overflow: hidden; | ||
vertical-align: bottom; | ||
|
||
&::after { | ||
display: inline-block; | ||
content: "..."; | ||
animation: AnimatedEllipsis-keyframes 1.2s steps(4, jump-none) infinite; | ||
} | ||
|
||
@keyframes AnimatedEllipsis-keyframes { | ||
0% { transform: translateX(-100%); } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters