fix(volume-slider): modify positioning so slider fits popup width
This commit is contained in:
parent
bf163d221c
commit
258dc594dd
|
@ -41,21 +41,37 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__text,
|
&__text {
|
||||||
&__slider {
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__slider {
|
&__contents {
|
||||||
width: 50px;
|
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 {
|
&__icon {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 20px;
|
min-width: 20px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|
|
@ -375,12 +375,14 @@ RemoteVideo.prototype._generatePopupMenuSliderItem = function (options) {
|
||||||
<span class='popupmenu__icon'>
|
<span class='popupmenu__icon'>
|
||||||
<i class=${options.icon}></i>
|
<i class=${options.icon}></i>
|
||||||
</span>
|
</span>
|
||||||
<input class='popupmenu__slider'
|
<div class='popupmenu__slider_container'>
|
||||||
type='range'
|
<input class='popupmenu__slider'
|
||||||
min='0'
|
type='range'
|
||||||
max=${options.maxValue || 100}
|
min='0'
|
||||||
value=${options.initialValue || 0}>
|
max=${options.maxValue || 100}
|
||||||
</input>
|
value=${options.initialValue || 0}>
|
||||||
|
</input>
|
||||||
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
const menuItem = document.createElement('li');
|
const menuItem = document.createElement('li');
|
||||||
|
|
Loading…
Reference in New Issue