Created
December 1, 2012 12:57
-
-
Save melihbuyuk/4182138 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@import "compass"; | |
// YOU HAVE TO VIEW FULL PAGE. | |
$default-transition-property: all; | |
$default-transition-duration: .2s; | |
$default-transition-function: ease-out; | |
$purple: #2a0d4c; | |
$dark-purple: #661995; | |
$very-dark-purple: #2c0b40; | |
$light-gray: #c1c1c1; | |
$gray: #3f4245; | |
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700); | |
@mixin striped($color, $angle) { | |
background-color: $color; | |
$lighten: rgba(255, 255, 255, .15); | |
@include background-image(linear-gradient($angle, $lighten 25%, transparent 25%, transparent 50%, $lighten 50%, $lighten 75%, transparent 75%, transparent)); | |
} | |
@mixin animation($args) { | |
-webkit-animation: $args; | |
-moz-animation: $args; | |
-o-animation: $args; | |
animation: $args; | |
} | |
* { | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
i { | |
font-style: normal; | |
} | |
html { | |
height: 100%; | |
} | |
body { | |
font-family: Tahoma, Arial; | |
@include background(radial-gradient(100% 0, circle farthest-side, #fbd7b5, #83678e)); | |
} | |
// mothereffingtextshadow.com | |
h1 { | |
font-size: 60px; | |
margin-top: 20px; | |
margin-bottom: 0; | |
color: white; | |
font-family: 'Open Sans'; | |
text-align: center; | |
text-shadow: | |
0 1px 0 #ccc, | |
0 2px 0 #c9c9c9, | |
0 3px 0 #bbb, | |
0 4px 0 #b9b9b9, | |
0 5px 0 #aaa, | |
0 6px 1px rgba(0,0,0,.1), | |
0 0 5px rgba(0,0,0,.1), | |
0 1px 3px rgba(0,0,0,.3), | |
0 3px 5px rgba(0,0,0,.2), | |
0 5px 10px rgba(0,0,0,.25), | |
0 10px 10px rgba(0,0,0,.2), | |
0 12px 12px rgba(0,0,0,.15); | |
} | |
h6 { | |
text-align: center; | |
margin: 8px 0 0; | |
a { | |
text-decoration: none; | |
} | |
a:hover { | |
text-decoration: underline; | |
} | |
} | |
.player { | |
width: 300px; | |
margin: 50px auto; | |
border-radius: 3px; | |
box-shadow: 0 0 15px 1px rgba(0, 0, 0, .5); | |
text-shadow: 0 1px 0 rgba(255, 255, 255, .8); | |
@include single-transition; | |
} | |
.title { | |
color: $purple; | |
font-size: 9px; | |
width: 100%; | |
padding: 2px 0 2px 15px; | |
border-radius: 3px 3px 0 0; | |
border-bottom: 1px solid #c7c5c5; | |
background: #fbf6f2; | |
@include single-transition; | |
} | |
.details { | |
position: relative; | |
z-index: 1; | |
height: 25px; | |
@include background(linear-gradient(top, #f8f4f1, #e1e0de)); | |
border-radius: 0 0 3px 3px; | |
border-top: 1px solid white; | |
} | |
.details > div { | |
float: left; | |
margin-left: 10px; | |
} | |
.comments, | |
.favorite, | |
.track-length, | |
.play { | |
cursor: pointer; | |
} | |
.details > div:first-child { | |
margin-left: 0; | |
} | |
.play { | |
position: relative; | |
top: -3px; | |
left: -1px; | |
width: 30px; | |
height: 28px; | |
margin-right: 6px; | |
border-bottom-left-radius: 3px; | |
} | |
// .play:hover svg path { | |
// stroke: #FFF; | |
// stroke-width: 1; | |
// @include single-transition; | |
// } | |
.play .icon { | |
position: absolute; | |
font-size: 12px; | |
top: 7px; | |
left: 12px; | |
color: $very-dark-purple; | |
text-shadow: none; | |
@include single-transition(color); | |
} | |
.play:hover { | |
.icon { | |
color: white; | |
} | |
.playing & .icon::before, | |
.playing & .icon::after { | |
background: white; | |
} | |
} | |
.playing .play .icon { | |
text-indent: -9999px; | |
} | |
.playing .play .icon::before, | |
.playing .play .icon::after { | |
content: ''; | |
position: absolute; | |
left: 1px; | |
top: 3px; | |
width: 3px; | |
height: 8px; | |
background: $very-dark-purple; | |
@include single-transition(background-color); | |
} | |
.playing .play .icon::after { | |
left: 5px; | |
} | |
// Seek buttons // | |
div.seek { | |
position: relative; | |
width: 13px; | |
height: 10px; | |
margin-top: 7px; | |
margin-left: 6px; | |
} | |
.seek.forward { | |
margin-left: 12px; | |
margin-right: -6px; | |
} | |
.seek::before, | |
.seek::after { | |
content: ''; | |
position: absolute; | |
width: 0; | |
height: 0; | |
top: 0; | |
border: 4px solid transparent; | |
border-right-color: $light-gray; | |
border-right-width: 6px; | |
} | |
.seek::before { | |
left: -5px; | |
} | |
.seek::after { | |
left: 0px; | |
content: " " | |
} | |
.forward::before, | |
.forward::after { | |
border: 4px solid transparent; | |
border-left-color: $light-gray; | |
border-left-width: 6px; | |
} | |
// Progress Bar // | |
.track { | |
position: relative; | |
margin-top: 8px; | |
width: 108px; | |
height: 7px; | |
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25), 0 1px 2px rgba(255, 255, 255, .7); | |
border-radius: 3px; | |
} | |
.track .progress { | |
width: 55%; // Just as a preview | |
height: 100%; | |
border-radius: 3px; | |
box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25);//, 0 1px 1px rgba(0, 0, 0, .25); | |
@include striped(lighten($dark-purple, 15%), -45deg); | |
background-size: 20px 20px; | |
background-repeat: repeat-x; | |
@include single-transition(width, .1s, ease-in-out); | |
} | |
.track.active .progress { | |
@include animation(progress-bar 1.2s linear infinite); | |
} | |
@-webkit-keyframes progress-bar { | |
from { | |
background-position: 0 0; | |
} | |
to { | |
background-position: -20px 0; | |
} | |
} | |
@-moz-keyframes progress-bar { | |
from { | |
background-position: 0 0; | |
} | |
to { | |
background-position: -20px 0; | |
} | |
} | |
@-o-keyframes progress-bar { | |
from { | |
background-position: 0 0; | |
} | |
to { | |
background-position: -20px 0; | |
} | |
} | |
@keyframes progress-bar { | |
from { | |
background-position: 0 0; | |
} | |
to { | |
background-position: -20px 0; | |
} | |
} | |
div.current-time { | |
margin-right: -6px; | |
margin-left: 6px; | |
} | |
// Track Length // | |
.track-length, | |
.current-time { | |
margin-top: 4px; | |
font-family: 'Open Sans', Arial; | |
color: $gray; | |
font-size: 10px; | |
} | |
div.comments { | |
margin-top: 7px; | |
margin-left: 13px; | |
} | |
.comment { | |
position: relative; | |
width: 8px; | |
height: 6px; | |
background: $light-gray; | |
box-shadow: 1px 1px 0 rgba(255, 255, 255, .75); | |
border-left: 1px solid rgba(255, 255, 255, 0.75); | |
@include single-transition; | |
} | |
.comment::before, | |
.comment::after { | |
content: ''; | |
position: absolute; | |
right: 1px; | |
bottom: -3px; | |
width: 0; | |
height: 0; | |
border-top: 3px solid $light-gray; | |
border-left: 3px solid transparent; | |
@include single-transition; | |
} | |
.comment::before { | |
right: 0; | |
bottom: -4px; | |
border-top-color: rgba(255, 255, 255, .75); | |
} | |
.comment-small { | |
z-index: -1; | |
width: 6px; | |
height: 5px; | |
left: -4px; | |
top: 3px; | |
} | |
.comment-small::before, | |
.comment-small::after { | |
left: 1px; | |
bottom: -2px; | |
border-left: none; | |
border-right: 3px solid transparent; | |
} | |
.comment-small::before { | |
left: 2px; | |
bottom: -3px; | |
} | |
.has-comments.comment, | |
.has-comments .comment { | |
@include background(linear-gradient(top, #74d3f4, #53b6ed)); | |
} | |
.has-comments.comment::after, | |
.has-comments .comment::after { | |
border-top-color: #53b6ed; | |
} | |
div.favorite { | |
margin-top: 9px; | |
margin-left: 12px; | |
position: relative; | |
} | |
.star, | |
.star::before, | |
.star::after { | |
width: 0; | |
height: 0; | |
border-right: 8px solid transparent; | |
border-bottom: 7px solid darken($light-gray, 10%); | |
border-left: 8px solid transparent; | |
@include single-transition; | |
} | |
.star::before, | |
.star::after { | |
content: ''; | |
position: absolute; | |
top: 0; | |
} | |
.star { | |
position: relative; | |
@include transform(scale(.8) rotate(180deg)); | |
} | |
.star + .star { | |
position: absolute; | |
top: 0; | |
@include transform(scale(.65) rotate(180deg)); | |
} | |
.star + .star, | |
.star + .star::before, | |
.star + .star::after { | |
border-bottom-color: $light-gray; | |
} | |
.favorited .star, | |
.favorited .star::before, | |
.favorited .star::after { | |
border-bottom-color: darken(#FAE466, 20%); | |
} | |
.favorited .star + .star, | |
.favorited .star + .star::before, | |
.favorited .star + .star::after { | |
border-bottom-color: #FAE466; | |
} | |
.star::before { | |
left: -8px; | |
@include rotate(-69deg); | |
} | |
.star::after { | |
left: -7px; | |
@include rotate(69deg); | |
} | |
.loading { | |
// display: none; | |
font-size: 35px; | |
text-align: center; | |
color: black; | |
@include animation(loading .5s ease-in-out alternate infinite); | |
} | |
@-webkit-keyframes loading { | |
from { | |
opacity: 0.2; | |
} | |
to { | |
opacity: 1; | |
} | |
} | |
@-moz-keyframes loading { | |
from { | |
opacity: 0.2; | |
} | |
to { | |
opacity: 1; | |
} | |
} | |
@-o-keyframes loading { | |
from { | |
opacity: 0.2; | |
} | |
to { | |
opacity: 1; | |
} | |
} | |
@keyframes loading { | |
from { | |
opacity: 0.2; | |
} | |
to { | |
opacity: 1; | |
} | |
} | |
// Double colons. Suck it IE8. | |
.clearfix::before, | |
.clearfix::after { | |
content: ' '; | |
display: table; | |
} | |
.clearfix::after { | |
clear: both; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment