Commit e73bc906 by jmclaus

Merge pull request #1134 from edx/jmclaus/bugfix_video_controls_focus_outline

All video controls have a full outline when receiving focus
parents 7d578e4f aeac8ddd
...@@ -136,7 +136,7 @@ div.video { ...@@ -136,7 +136,7 @@ div.video {
&:focus, &:hover { &:focus, &:hover {
background-color: lighten($pink, 10%); background-color: lighten($pink, 10%);
outline: none; outline: 0;
} }
} }
} }
...@@ -162,9 +162,16 @@ div.video { ...@@ -162,9 +162,16 @@ div.video {
text-indent: -9999px; text-indent: -9999px;
width: 14px; width: 14px;
background: url('../images/vcr.png') 15px 15px no-repeat; background: url('../images/vcr.png') 15px 15px no-repeat;
outline: 0;
&:focus { &:focus {
position: relative;
z-index: 10000;
outline: #fff dotted thin;
outline-offset: -2px;
background: #333;
}
&:hover {
outline: 0; outline: 0;
} }
...@@ -176,7 +183,7 @@ div.video { ...@@ -176,7 +183,7 @@ div.video {
&.play { &.play {
background-position: 17px -114px; background-position: 17px -114px;
&:hover, &:focus { &:hover {
background-color: #444; background-color: #444;
} }
} }
...@@ -184,7 +191,7 @@ div.video { ...@@ -184,7 +191,7 @@ div.video {
&.pause { &.pause {
background-position: 16px -50px; background-position: 16px -50px;
&:hover, &:focus { &:hover {
background-color: #444; background-color: #444;
} }
} }
...@@ -203,6 +210,19 @@ div.video { ...@@ -203,6 +210,19 @@ div.video {
div.secondary-controls { div.secondary-controls {
float: right; float: right;
div.speeds>a, div.volume>a, a.add-fullscreen, a.quality_control,
a.hide-subtitles {
// overflow is used to bypass Firefox CSS :focus outline bug
// http://johndoesdesign.com/blog/2012/css/firefox-and-its-css-focus-outline-bug/
&:focus {
position: relative;
z-index: 10000;
outline: #fff dotted thin;
outline-offset: -2px;
overflow: auto;
}
}
div.speeds { div.speeds {
float: left; float: left;
position: relative; position: relative;
...@@ -250,10 +270,15 @@ div.video { ...@@ -250,10 +270,15 @@ div.video {
} }
} }
outline: 0; &:hover {
&:focus {
outline: 0; outline: 0;
opacity: 1.0;
background-color: #444;
}
&:active {
opacity: 1.0;
background-color: #444;
} }
h3 { h3 {
...@@ -280,11 +305,6 @@ div.video { ...@@ -280,11 +305,6 @@ div.video {
line-height: 46px; line-height: 46px;
color: #fff; color: #fff;
} }
&:hover, &:active, &:focus {
opacity: 1.0;
background-color: #444;
}
} }
// fix for now // fix for now
...@@ -320,6 +340,7 @@ div.video { ...@@ -320,6 +340,7 @@ div.video {
&:hover { &:hover {
background-color: #666; background-color: #666;
color: #aaa; color: #aaa;
outline-offset: -4px;
} }
} }
...@@ -371,9 +392,12 @@ div.video { ...@@ -371,9 +392,12 @@ div.video {
@include transition(none); @include transition(none);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
width: 30px; width: 30px;
&:hover, &:active, &:focus { &:hover, &:active {
background-color: #444; background-color: #444;
color: #fff;
text-decoration: none;
outline: 0;
} }
} }
...@@ -433,14 +457,16 @@ div.video { ...@@ -433,14 +457,16 @@ div.video {
text-indent: -9999px; text-indent: -9999px;
@include transition(none); @include transition(none);
width: 30px; width: 30px;
&:hover, &:active, &:focus { &:hover, &:active {
background-color: #444; background-color: #444;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
outline: 0;
} }
} }
a.quality_control { a.quality_control {
background: url(../images/hd.png) center no-repeat; background: url(../images/hd.png) center no-repeat;
border-right: 1px solid #000; border-right: 1px solid #000;
...@@ -455,16 +481,18 @@ div.video { ...@@ -455,16 +481,18 @@ div.video {
@include transition(none); @include transition(none);
width: 30px; width: 30px;
&:hover, &:focus { &:hover {
background-color: #444; background-color: #444;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
outline: 0;
} }
&.active { &.active {
background-color: #F44; background-color: #F44;
color: #0ff; color: #0ff;
text-decoration: none; text-decoration: none;
outline: 0;
} }
} }
...@@ -483,10 +511,11 @@ div.video { ...@@ -483,10 +511,11 @@ div.video {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
width: 30px; width: 30px;
&:hover, &:focus { &:hover {
background-color: #444; background-color: #444;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
outline: 0;
} }
&.off { &.off {
...@@ -530,8 +559,7 @@ div.video { ...@@ -530,8 +559,7 @@ div.video {
margin-bottom: 8px; margin-bottom: 8px;
padding: 0; padding: 0;
line-height: lh(); line-height: lh();
outline-width: 0px; outline: 0;
outline-style: none;
&.current { &.current {
color: #333; color: #333;
...@@ -539,8 +567,8 @@ div.video { ...@@ -539,8 +567,8 @@ div.video {
} }
&.focused { &.focused {
outline-width: 1px; outline: #000 dotted thin;
outline-style: dotted; outline-offset: -1px;
} }
&:hover { &:hover {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment