Merge pull request #1592 from virtuacoplenny/lenny/slider-width

fix(volume-slider): modify positioning so slider fits popup width
This commit is contained in:
yanas 2017-05-23 10:15:36 -05:00 committed by GitHub
commit 1d60300016
2 changed files with 29 additions and 11 deletions

View File

@ -41,21 +41,37 @@
}
}
&__text,
&__slider {
&__text {
display: inline-block;
vertical-align: middle;
}
&__slider {
width: 50px;
&__contents {
display: flex;
/**
* Positioning styles on the slider and its container are used to make
* the container fit the popup width, by removing the slider from the
* page flow, and then making the slider fit the container.
*/
.popupmenu__slider_container {
position: relative;
width: 100%;
.popupmenu__slider {
bottom: 50%;
position: absolute;
top: 50%;
width: 100%;
}
}
}
&__icon {
vertical-align: middle;
position: relative;
display: inline-block;
width: 20px;
min-width: 20px;
height: 100%;
text-align: center;

View File

@ -375,12 +375,14 @@ RemoteVideo.prototype._generatePopupMenuSliderItem = function (options) {
<span class='popupmenu__icon'>
<i class=${options.icon}></i>
</span>
<input class='popupmenu__slider'
type='range'
min='0'
max=${options.maxValue || 100}
value=${options.initialValue || 0}>
</input>
<div class='popupmenu__slider_container'>
<input class='popupmenu__slider'
type='range'
min='0'
max=${options.maxValue || 100}
value=${options.initialValue || 0}>
</input>
</div>
</div>`;
const menuItem = document.createElement('li');