See blog entry at http://atomeye.com/projects/sass-css-spinner.html for more details.
The Ouroboros is an ancient symbol depicting a serpent or dragon eating its own tail. Inspired by application progress spinners this provides an imageless 'throbber' for modern browsers that eats itself (in a way). The name comes after the greek words ουρά (tail) + βόρος (eater / devourer).
A standard 32x32 animated gif throbber is provided as a fallback for older versions of IE. It is centered where the spinner animation would have been.
_ui-spinner.scss
into your project.spinner-old-ie.scss
and the throbber.gif. You can include it with an IE conditional tag. See the example in index.html
.<!--[if IE]>
<link media="screen" type="text/css" href="https://github.com/tomgenoni/ouroboros/blob/master/stylesheets/spinner-old-ie.css" rel="stylesheet" />
<![endif]-->
ui-spinner
mixin with defaults or pass in any arguments. Also see the mixin examples in example.scss
.@include ui-spinner; // Will use defaults.
@include ui-spinner(#fff, 60px, gray, purple, .7, 4s); // Will use these variables.
index.html
.<div class="ui-spinner">
<span class="side side-left">
<span class="fill"></span>
</span>
<span class="side side-right">
<span class="fill"></span>
</span>
</div>
Parameter | Description | Defaults |
---|---|---|
Hole color* | Color of the hole to fake a ring | transparent |
Size | Size of the spinner | 46px |
Background color light | First color, specify a lighter of the two colors | #ddd |
Background color dark | Second color, specify the darker of the two colors | #3c76ca |
Opacity | The opacity of the spinner | .8 |
Duration | Speed of the spinner | 3s |
You can use the CSS that the Sass generates in stylesheets/main.scss
and make edits to the parameters described above.