cross-browser opacity mixin

This commit is contained in:
danielgrippi 2011-03-22 12:40:44 -07:00
parent 48598a9942
commit cc01beb3d0
2 changed files with 20 additions and 12 deletions

View file

@ -27,3 +27,10 @@
background: -webkit-gradient(linear, 0% $start, 0% $end, from($from), to($to)); background: -webkit-gradient(linear, 0% $start, 0% $end, from($from), to($to));
background: -moz-linear-gradient(top, $from $start, $to $end); background: -moz-linear-gradient(top, $from $start, $to $end);
} }
@mixin opacity($val){
filter: alpha(opacity= $val* 100);
-moz-opacity: $val;
-khtml-opacity: $val;
opacity: $val;
}

View file

@ -400,11 +400,11 @@ header
.delete .delete
:opacity 0.6 @include opacity(0.6)
:padding 5px :padding 5px
&:hover &:hover
:opacity 1 @include opacity(1)
.time, .time,
.timeago .timeago
@ -946,14 +946,14 @@ label
:shadow 0 1px 0 #eee :shadow 0 1px 0 #eee
img img
@include opacity(0.4)
:display inline-block :display inline-block
:margin 0 :margin 0
:padding 0 :padding 0
:margin :margin
:bottom -3px :bottom -3px
:opacity 0.4
&:hover &:hover
:background :background
:color #eee :color #eee
@ -961,16 +961,16 @@ label
:color #666 :color #666
img img
:opacity 0.6 @include opacity(0.6)
&:active &:active
:text-shadow 0 1px 0 #fafafa :text-shadow 0 1px 0 #fafafa
:color #ccc :color #ccc
img img
:opacity 0.1 @include opacity(0.1)
&.loading &.loading
:opacity 0.5 @include opacity(0.5)
#publisher_textarea_wrapper #publisher_textarea_wrapper
:position relative :position relative
@ -1035,7 +1035,7 @@ label
:display inline :display inline
.dim .dim
:opacity 0.3 @include opacity(0.3)
img.thumb_small img.thumb_small
:max-height 50px :max-height 50px
@ -2072,7 +2072,7 @@ h3,h4
:top 3px :top 3px
&:hover &:hover
:opacity 0.5 @include opacity(0.5)
#edit_aspect_trigger #edit_aspect_trigger
:font :font
@ -2169,10 +2169,11 @@ h3,h4
.stream_element .stream_element
.aspect_badges .aspect_badges
:opacity 0.5 @include opacity(0.5)
&:hover &:hover
.aspect_badges .aspect_badges
:opacity 1 @include opacity(1)
.aspect_badge .aspect_badge
:position relative :position relative
@ -2696,7 +2697,7 @@ div.dislikes
:right 5px :right 5px
#contact_visibility_padlock:hover #contact_visibility_padlock:hover
:opacity 0.7 @include opacity(0.7)
.side_stream .side_stream
.stream_element .stream_element