Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
fix :active state and bigger click target for back button (bug 789984)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvan committed Sep 18, 2012
1 parent 622c878 commit c219890
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
27 changes: 18 additions & 9 deletions media/css/mkt/header.less
Expand Up @@ -67,9 +67,6 @@
> section {
position: relative;
}
.pressed() {
background-image: -moz-linear-gradient(top, fade(#000, 0%), fade(#000, 25%) 25%, fade(#000, 25%) 75%, fade(#000, 0%) 100%);
}
}

.header-button {
Expand Down Expand Up @@ -129,18 +126,30 @@
background-position: 0 -48px;
}
&.back {
width: 20px;
#site-header > .pressed;
width: 40px;
&:after {
right: 19px;
top: 0;
}
&:before {
background-position: 0 -72px;
width: 12px;
left: 4px;
}
&:hover {
background-image: -moz-linear-gradient(top, fade(#000, 0%), fade(#000, 35%) 25%, fade(#000, 35%) 75%, fade(#000, 0%) 100%);
/* Gives us a big click target without being totally insane. */
b {
display: block;
height: 50px;
overflow: hidden;
width: 20px;
}
&:hover b {
background-image: -moz-linear-gradient(top, fade(#000, 0%), fade(#000, 25%) 25%, fade(#000, 25%) 75%, fade(#000, 0%) 100%);
background-image: -webkit-linear-gradient(top, fade(#000, 0%), fade(#000, 25%) 25%, fade(#000, 25%) 75%, fade(#000, 0%) 100%);
}
&:focus {
.depressed;
&:active b {
background-image: -moz-linear-gradient(top, fade(#000, 0%), fade(#000, 35%) 25%, fade(#000, 35%) 75%, fade(#000, 0%) 100%);
background-image: -webkit-linear-gradient(top, fade(#000, 0%), fade(#000, 35%) 25%, fade(#000, 35%) 75%, fade(#000, 0%) 100%);
}
}
&.home {
Expand Down
2 changes: 1 addition & 1 deletion mkt/templates/mkt/header.html
Expand Up @@ -5,7 +5,7 @@ <h1><a href="{{ url('home') }}">{{ _('Firefox Marketplace') }}</a></h1>
<nav role="navigation">
<a href="{{ url('home') }}" class="header-button icon home left">{{ _('Home') }}</a>
<a href="{{ url('account.settings') }}" class="header-button icon settings left">{{ _('Settings') }}</a>
<a href="#" id="nav-back" class="header-button icon back left">{{ _('Back') }}</a>
<a href="#" id="nav-back" class="header-button icon back left"><b>{{ _('Back') }}</b></a>
<a href="#" class="header-button icon search right">{{ _('Search') }}</a>
<a href="#" class="header-button icon cancel right">{{ _('Cancel') }}</a>
<a href="#" class="header-button filter right">{{ _('Filter') }}</a>
Expand Down

0 comments on commit c219890

Please sign in to comment.