Skip to content

Instantly share code, notes, and snippets.

@Grawl
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Grawl/edab1d134b22587acbff to your computer and use it in GitHub Desktop.
Save Grawl/edab1d134b22587acbff to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<fieldset class="rating"><input id="star0" name="rating" type="radio" value="5" /><label for="star0" title="5">0 stars</label><input id="star1" name="rating" type="radio" value="4" /><label for="star1" title="4">1 stars</label><input id="star2" name="rating" type="radio" value="3" /><label for="star2" title="3">2 stars</label><input id="star3" name="rating" type="radio" value="2" /><label for="star3" title="2">3 stars</label><input id="star4" name="rating" type="radio" value="1" /><label for="star4" title="1">4 stars</label></fieldset>
// ----
// libsass (v3.1.0)
// ----
$object:
(
('left', 0), ('top', 12)
),
(
('left', 3), ('top', 4)
),
(
('left', 11), ('top', 1)
),
(
('right', 3), ('top', 4)
),
(
('right', 0), ('top', 12)
),
(
('right', 3), ('bottom', 3)
),
(
('left', 11), ('bottom', 0)
),
(
('left', 3), ('bottom', 3), -135
);
$i: 0;
$rotate-angle: 45;
$rotate-initial: -90 - $rotate-angle;
$delay-delta: 0.09;
$delay-initial: 0.27 - $delay-delta;
@each $x, $y, $rotate in $object {
$i: $i + 1;
$id: $i;
@if $id < 10 {
$id: "0#{$id}";
}
$position-unit: 1px;
@if not $rotate {
$rotate-initial: $rotate-initial + $rotate-angle;
$rotate: $rotate-initial;
}
$delay-initial: $delay-initial + $delay-delta;
$delay: $delay-initial;
.rotateG_#{$id} {
#{nth($x, 1)}: nth($x, 2) * $position-unit;
#{nth($y, 1)}: nth($y, 2) * $position-unit;
animation-delay: $delay * 1s;
transform: rotate($rotate * 1deg);
}
}
.rotateG_01 {
left: 0px;
top: 12px;
animation-delay: 0.27s;
transform: rotate(-90deg); }
.rotateG_02 {
left: 3px;
top: 4px;
animation-delay: 0.36s;
transform: rotate(-45deg); }
.rotateG_03 {
left: 11px;
top: 1px;
animation-delay: 0.45s;
transform: rotate(0deg); }
.rotateG_04 {
right: 3px;
top: 4px;
animation-delay: 0.54s;
transform: rotate(45deg); }
.rotateG_05 {
right: 0px;
top: 12px;
animation-delay: 0.63s;
transform: rotate(90deg); }
.rotateG_06 {
right: 3px;
bottom: 3px;
animation-delay: 0.72s;
transform: rotate(135deg); }
.rotateG_07 {
left: 11px;
bottom: 0px;
animation-delay: 0.81s;
transform: rotate(180deg); }
.rotateG_08 {
left: 3px;
bottom: 3px;
animation-delay: 0.9s;
transform: rotate(-135deg); }
<fieldset class="rating"><input id="star0" name="rating" type="radio" value="5" /><label for="star0" title="5">0 stars</label><input id="star1" name="rating" type="radio" value="4" /><label for="star1" title="4">1 stars</label><input id="star2" name="rating" type="radio" value="3" /><label for="star2" title="3">2 stars</label><input id="star3" name="rating" type="radio" value="2" /><label for="star3" title="2">3 stars</label><input id="star4" name="rating" type="radio" value="1" /><label for="star4" title="1">4 stars</label></fieldset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment