Skip to content

Commit

Permalink
Merge pull request #70 from tilomitra/menu-outline
Browse files Browse the repository at this point in the history
Fix for issue #22: Remove dotted focus border from menus
  • Loading branch information
ericf committed Jun 7, 2013
2 parents c25c080 + 2584aa3 commit 956898d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ NEXT
* Added `pure-menu-separator-vertical` classname that can be used to visually
separate horizonal menu items. (Issue #53) (codepb, mseri)

* Focused menus have an `outline: none` by default. Instead, menu-items that
have been opened to display children (in a drop-down menu) get a slight
background (`#dedede`) for accessibility. (Issue #22)

0.1.0 (2013-05-24)
------------------
Expand Down
6 changes: 5 additions & 1 deletion src/menus/css/menus-core.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*csslint adjoining-classes:false*/
/*csslint adjoining-classes:false, outline-none:false*/
/*TODO: Remove this lint rule override after a refactor of this code.*/

.pure-menu ul {
Expand Down Expand Up @@ -29,6 +29,10 @@
visibility: visible;
}

.pure-menu-open > ul:focus {
outline: none;
}

.pure-menu li { position: relative; }

.pure-menu a, .pure-menu .pure-menu-heading {
Expand Down
6 changes: 5 additions & 1 deletion src/menus/css/menus.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.pure-menu.pure-menu-open,
.pure-menu.pure-menu-horizontal li .pure-menu-children {
background: #ffffff; /* Old browsers */
background: #fff; /* Old browsers */
border: 1px solid #b7b7b7;
}

Expand Down Expand Up @@ -35,6 +35,10 @@
color: #fff;
}

/* Focus style for a dropdown menu-item when the parent has been opened */
.pure-menu .pure-menu-open {
background: #dedede;
}


/* HOVER STATES */
Expand Down

0 comments on commit 956898d

Please sign in to comment.