From 3ac30bb6b1a771a4190d7e15fb90506409229521 Mon Sep 17 00:00:00 2001 From: Matchu Date: Fri, 15 Jul 2011 19:39:20 -0400 Subject: [PATCH] cleaner hover state for closet quantity --- app/stylesheets/_layout.sass | 7 +++- app/stylesheets/closet_hangers/_index.sass | 4 +- public/stylesheets/compiled/screen.css | 48 +++++++++++----------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/app/stylesheets/_layout.sass b/app/stylesheets/_layout.sass index 0918b315..62e30d25 100644 --- a/app/stylesheets/_layout.sass +++ b/app/stylesheets/_layout.sass @@ -167,13 +167,16 @@ ul.buttons text-decoration: none img +opacity(0.75) - &:hover img - +opacity(1) img display: block height: $object-img-size margin: 0 auto width: $object-img-size + &:hover img, a:hover img + // behave in browsers that only respond to a:hover, but also be in the + // hover state more often for browsers who support div:hover + // (quantity form in user items) + +opacity(1) .nc-icon, .closeted-icon +opacity(1) diff --git a/app/stylesheets/closet_hangers/_index.sass b/app/stylesheets/closet_hangers/_index.sass index 6737d1f4..8f489f88 100644 --- a/app/stylesheets/closet_hangers/_index.sass +++ b/app/stylesheets/closet_hangers/_index.sass @@ -38,7 +38,9 @@ body.closet_hangers-index .object:hover .quantity +opacity(1) - top: $object-img-size - 30px + background: transparent + top: $object-img-size - 25px + padding: 0 span display: none diff --git a/public/stylesheets/compiled/screen.css b/public/stylesheets/compiled/screen.css index 42aca470..d075cabd 100644 --- a/public/stylesheets/compiled/screen.css +++ b/public/stylesheets/compiled/screen.css @@ -290,20 +290,20 @@ ul.buttons li, ul.buttons li form { -khtml-opacity: 0.75; } /* line 170, ../../../app/stylesheets/_layout.sass */ -.object a:hover img { - -moz-opacity: 1; - -webkit-opacity: 1; - -o-opacity: 1; - -khtml-opacity: 1; -} -/* line 172, ../../../app/stylesheets/_layout.sass */ .object img { display: block; height: 80px; margin: 0 auto; width: 80px; } -/* line 178, ../../../app/stylesheets/_layout.sass */ +/* line 175, ../../../app/stylesheets/_layout.sass */ +.object:hover img, .object a:hover img { + -moz-opacity: 1; + -webkit-opacity: 1; + -o-opacity: 1; + -khtml-opacity: 1; +} +/* line 181, ../../../app/stylesheets/_layout.sass */ .object .nc-icon, .object .closeted-icon { -moz-opacity: 1; -webkit-opacity: 1; @@ -314,33 +314,33 @@ ul.buttons li, ul.buttons li form { top: 64px; width: 16px; } -/* line 184, ../../../app/stylesheets/_layout.sass */ +/* line 187, ../../../app/stylesheets/_layout.sass */ .object .nc-icon:hover, .object .closeted-icon:hover { -moz-opacity: 0.5; -webkit-opacity: 0.5; -o-opacity: 0.5; -khtml-opacity: 0.5; } -/* line 187, ../../../app/stylesheets/_layout.sass */ +/* line 190, ../../../app/stylesheets/_layout.sass */ .object .nc-icon { right: 16px; } -/* line 190, ../../../app/stylesheets/_layout.sass */ +/* line 193, ../../../app/stylesheets/_layout.sass */ .object .closeted-icon { left: 16px; } -/* line 193, ../../../app/stylesheets/_layout.sass */ +/* line 196, ../../../app/stylesheets/_layout.sass */ dt { font-weight: bold; } -/* line 196, ../../../app/stylesheets/_layout.sass */ +/* line 199, ../../../app/stylesheets/_layout.sass */ dd { margin: 0 0 1.5em 1em; } -/* line 199, ../../../app/stylesheets/_layout.sass */ +/* line 202, ../../../app/stylesheets/_layout.sass */ #home-link { font-family: Delicious, Helvetica, Arial, Verdana, sans-serif; font-size: 175%; @@ -351,21 +351,21 @@ dd { position: absolute; top: 0; } -/* line 209, ../../../app/stylesheets/_layout.sass */ +/* line 212, ../../../app/stylesheets/_layout.sass */ #home-link:hover { background: #eeffee; text-decoration: none; } -/* line 212, ../../../app/stylesheets/_layout.sass */ +/* line 215, ../../../app/stylesheets/_layout.sass */ #home-link span:before { content: "<< "; } -/* line 216, ../../../app/stylesheets/_layout.sass */ +/* line 219, ../../../app/stylesheets/_layout.sass */ .pagination a, .pagination span { margin: 0 0.5em; } -/* line 218, ../../../app/stylesheets/_layout.sass */ +/* line 221, ../../../app/stylesheets/_layout.sass */ .pagination .current { font-weight: bold; } @@ -629,22 +629,24 @@ body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity { -webkit-opacity: 1; -o-opacity: 1; -khtml-opacity: 1; - top: 50px; + background: transparent; + top: 55px; + padding: 0; } -/* line 43, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 45, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity span { display: none; } -/* line 46, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 48, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity form { display: inline; } -/* line 49, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 51, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity form input[type=number] { padding: 2px; width: 2em; } -/* line 53, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 55, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity input[type=submit] { font-size: 85%; }