Skip to content

Commit

Permalink
Adding transition exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Oct 8, 2012
1 parent ce43137 commit a53a4fc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions transition-mixin/bin/dev.sh
@@ -0,0 +1,2 @@
sass -l --update style.scss:style.css
sass -l --watch style.scss:style.css
1 change: 1 addition & 0 deletions transition-mixin/bin/prod.sh
@@ -0,0 +1 @@
sass --style compressed --update style.scss:style.css
11 changes: 11 additions & 0 deletions transition-mixin/index.html
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<input type="checkbox" id="toggler">
<label for="toggler">Toggle to animate box</label>
<div class="box"></div>
</body>
</html>
12 changes: 12 additions & 0 deletions transition-mixin/style.scss
@@ -0,0 +1,12 @@
.box {
background: red;
position: relative;
width: 100px;
height: 100px;
//@include transition(all 1s ease-in-out);

#toggler:checked ~ & {
background: green;
left: 300px;
}
}

0 comments on commit a53a4fc

Please sign in to comment.