shaka-player
Version:
DASH/EME video player library
158 lines (135 loc) • 4.6 kB
text/less
/**
* @license
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* A settings menu, which encompasses the top-level overflow menu and all
* submenus. These appear on top of all other controls (Z axis) when the
* overflow button is clicked. */
.shaka-settings-menu {
/* It's okay to add a vertical scroll if there are too many items, but
* horizontal scrolling is not allowed. */
overflow-x: hidden;
overflow-y: auto;
/* Don't wrap text to the next line. */
white-space: nowrap;
/* Styles for the menu itself. */
background: white;
box-shadow: 0 1px 9px 0 rgba(0, 0, 0, 0.4);
border-radius: 2px;
max-height: 250px;
min-width: 180px;
/* The menu is hidden by default. */
.hidden();
/* When displayed as a flex container, elements inside will flow in a
* vertical column. */
flex-direction: column;
/* Where the menu appears. */
position: absolute;
z-index: 2;
right: 15px;
bottom: 30px;
/* The buttons inside the menu. */
button {
font-size: 14px;
background: transparent;
color: black;
border: none;
min-height: 30px;
padding: 3.5px 6px;
/* The button itself is a flex container, with children center-aligned. */
display: flex;
align-items: center;
/* When hovered, the button's background is highlighted. */
&:hover {
background: rgb(224, 224, 224);
}
.shaka-keyboard-navigation &:focus {
background: rgb(224, 224, 224);
}
}
/* These are the elements which contain the material design icons.
* TODO: Pull MD icon details out of JS. */
i {
/* TODO(b/116651454): eliminate hard-coded offsets */
padding-left: 10px;
padding-right: 10px;
}
/* If the seekbar is missing, this is positioned lower.
* TODO: Solve with flex layout instead? */
&.shaka-low-position {
/* TODO(b/116651454): eliminate hard-coded offsets */
bottom: 15px;
}
}
/* The span elements inside the top-level overflow menu contain single lines
* of text, which are the button name and the current selection. For example,
* a captions button might have "Captions" in one span (the button name), and
* "Farsi" in another (the current selection).
* These are displayed inside a .shaka-overflow-button-label grouping, to the
* right of MD icons. */
.shaka-overflow-menu span {
text-align: left;
}
/* This contains span elements with single lines of text, and appears to the
* right of MD icons. */
.shaka-overflow-button-label {
position: relative;
/* This is a flex container, whose children flow vertically. */
display: flex;
flex-direction: column;
}
/* This is the specific span element which shows the current selection from some
* submenu. For example, it would contain the currently-selected subtitle
* language, the currently-selected resolution, etc. */
.shaka-current-selection-span {
/* This is dimmer than the other span, which is the name of the submenu. */
color: rgba(0, 0, 0, 0.54);
}
/* These three submenus have somewhat different margins inside them.
* TODO: This is all submenus, but not the top-level menu. Is there a better
* way to express this? */
.shaka-resolutions, .shaka-audio-languages, .shaka-text-languages {
span {
/* TODO(b/116651454): eliminate hard-coded offsets */
margin-left: 54px;
}
}
/* This is a button within each submenu that takes you back to the main overflow
* menu. */
.shaka-back-to-overflow-button {
/* The label inside the button, which says something like "back". */
span {
/* TODO(b/116651454): eliminate hard-coded offsets */
margin-left: 0;
}
/* The MD icon for the "back" arrow. */
i {
/* TODO(b/116651454): eliminate hard-coded offsets */
padding-right: 20px;
}
}
/* The menu item for resolutions which contains "auto". */
.shaka-auto-span {
/* TODO(b/116651454): eliminate hard-coded offsets */
left: 17px;
}
/* The captions button, when captions are on. */
.shaka-captions-on {
color: black;
}
/* The captions button, when captions are off. */
.shaka-captions-off {
color: grey;
}