-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline volumeMenuButton option #2378
Closed
+170
−87
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d5b5b90
initial stab at making this work
mmcc bc9e231
default to vertical: false for an inline volumeMenuButton
mmcc 3c63076
move options.inline check into vertical undefined check
mmcc 14696d6
add comment about volume-specific style in inline
mmcc d7b6c15
volume slider and progress bar now align properly
mmcc 9af38b5
play pause is just like the rest of us
mmcc 0c27d29
hide the scrollbars
mmcc 7914716
fixed issues in IE8
mmcc 7a842e2
fixed positioning styles now that handle is smaller
mmcc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.video-js .vjs-play-control { | ||
width: 5em; | ||
cursor: pointer; | ||
@include flex(none); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.video-js .vjs-menu-button-inline { | ||
@include transition(all 0.4s); | ||
|
||
overflow: hidden; | ||
} | ||
|
||
.video-js .vjs-menu-button.vjs-menu-button-inline:before { | ||
// Icon pseudoelement has a different base font size (1.8em), so we need to | ||
// account for that in the width. 4em (standard button width) divided by 1.8 | ||
// to get the same button width as normal. | ||
width: 2.222222222em; | ||
} | ||
|
||
.video-js .vjs-menu-button-inline .vjs-menu { | ||
opacity: 0; | ||
height: 100%; | ||
width: auto; | ||
|
||
position: absolute; | ||
left: 2.2222222em; | ||
top: 0; | ||
|
||
padding: 0; | ||
margin: 0; | ||
|
||
@include transition(all 0.2s); | ||
} | ||
|
||
.video-js.vjs-no-flex .vjs-menu-button-inline .vjs-menu { | ||
position: relative; | ||
width: 0; | ||
} | ||
|
||
.video-js.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu { | ||
width: auto; | ||
} | ||
|
||
.video-js .vjs-menu-button-inline .vjs-menu .vjs-menu-content { | ||
width: auto; | ||
height: 100%; | ||
margin: 0; | ||
|
||
overflow: hidden; | ||
} | ||
|
||
// Hover state | ||
.video-js .vjs-menu-button-inline:hover { | ||
// This width is currently specific to the inline volume bar. | ||
width: 10em; | ||
} | ||
|
||
.video-js .vjs-menu-button.vjs-menu-button-inline:hover .vjs-menu, | ||
.video-js .vjs-menu-button-inline .vjs-menu.vjs-lock-showing { | ||
display: block; | ||
opacity: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.video-js .vjs-menu-button-popup .vjs-menu { | ||
display: none; | ||
position: absolute; | ||
bottom: 0; | ||
left: -3em; /* (Width of vjs-menu - width of button) / 2 */ | ||
width: 0em; | ||
height: 0em; | ||
margin-bottom: 1.5em; | ||
border-top-color: rgba(7, 40, 50, $control-bar--transparency); /* Same as ul background */ | ||
} | ||
|
||
/* Button Pop-up Menu */ | ||
.video-js .vjs-menu-button-popup .vjs-menu-content { | ||
@include background-color-with-alpha($primary-bg, 0.7); | ||
} | ||
|
||
.video-js .vjs-menu-button-popup .vjs-menu .vjs-menu-content { | ||
position: absolute; | ||
width: 10em; | ||
bottom: 1.5em; /* Same bottom as vjs-menu border-top */ | ||
max-height: 15em; | ||
} | ||
|
||
.video-js .vjs-menu-button.vjs-menu-button-popup:hover .vjs-menu, | ||
.video-js .vjs-menu-button-popup .vjs-menu.vjs-lock-showing { | ||
display: block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.video-js .vjs-menu-button { | ||
cursor: pointer; | ||
} | ||
|
||
.video-js .vjs-menu .vjs-menu-content { | ||
display: block; | ||
padding: 0; margin: 0; | ||
overflow: auto; | ||
} | ||
|
||
/* prevent menus from opening while scrubbing (FF, IE) */ | ||
.video-js.vjs-scrubbing .vjs-menu-button:hover .vjs-menu { | ||
display: none; | ||
} | ||
|
||
.video-js .vjs-menu ul li { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0.2em 0; | ||
line-height: 1.4em; | ||
font-size: 1.2em; | ||
text-align: center; | ||
text-transform: lowercase; | ||
} | ||
|
||
.video-js .vjs-menu ul li.vjs-selected { | ||
background-color: $primary-bg; | ||
} | ||
.video-js .vjs-menu ul li:focus, | ||
.video-js .vjs-menu ul li:hover, | ||
.video-js .vjs-menu ul li.vjs-selected:focus, | ||
.video-js .vjs-menu ul li.vjs-selected:hover { | ||
outline: 0; | ||
color: $primary-bg; | ||
|
||
@include background-color-with-alpha($primary-text, 0.75); | ||
} | ||
.video-js .vjs-menu ul li.vjs-menu-title { | ||
text-align: center; | ||
text-transform: uppercase; | ||
font-size: 1em; | ||
line-height: 2em; | ||
padding: 0; | ||
margin: 0 0 0.3em 0; | ||
font-weight: bold; | ||
cursor: default; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's a lot of CSS, but seems better to me to keep all the menu styles in one file. Just my opinion.