Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prismatic loader #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The full list of loading indicator class names are shown below. To see them in a
| .inner-circles-loader | A filling circle with other circles |
| .pong-loader | Retro tennis-like game simulation from the 70s. |
| .pulse-loader | A pulsing circle. Shrinking and enlarging. |
| .prismatic-loader | Prismatic's website loader animation |


Customize with Sass
Expand Down
8 changes: 7 additions & 1 deletion examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<span class="hexdots-loader">Loading&#8230;</span>
</div>
</div>

<div class="cell">
<div class="card">
<span class="inner-circles-loader">Loading&#8230;</span>
Expand All @@ -156,6 +156,12 @@
</div>
</div>

<div class="cell">
<div class="card">
<span class="prismatic-loader">Loading&#8230;</span>
</div>
</div>

</div>

</body>
Expand Down
38 changes: 38 additions & 0 deletions sass/spinner/prismatic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@import "compass/css3";

$background-color: #ddd !default;
$border: 5px solid #fff !default;
$element-width: 50px !default;
$element-height: 50px !default;
$prismatic-loader-speed: 1s !default;

.prismatic-loader:not(:required) {
width: $element-width;
height: $element-height;
@include border-radius(50%);
background: $background-color;
display: inline-block;
position: relative;
overflow: hidden;
text-indent: -99999px;

&:before {
content: "";
display: block;
width: 0;
height: 0;
background: $background-color;
border: $border;
@include border-radius(50%);
position: absolute;
top: 50%;
left: 50%;
@include transform(translate3d(-50%, -50%, 0));
@include animation(prismatic-loader $prismatic-loader-speed infinite);
}
}

@include keyframes(prismatic-loader) {
from { width: 0; height: 0; }
to { height: 100%; width: 100%; }
}
1 change: 1 addition & 0 deletions sass/spinners.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
@import "spinner/inner-circles";
@import "spinner/pong";
@import "spinner/pulse";
@import "spinner/prismatic";