mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-26 17:46:26 +03:00
2379c4485c
- Make shaka-overlay-parent a mixin instead of an actual class
- Fox maximum stylability, it should be the job of the styles to
position and overlay objects without JS code declaring that it be
so.
- The "seek to live" effect of clicking the current time no longer
depends on the seek bar being used
- The shaka-transparent class is not needed. The controls are now
set to be opaque based on an attribute.
- Use an attribute for casting state as well.
- Remove redundant opacity transition on play button. It is already
on the controls overlay as a whole.
- Make layout more generic, which allows us to remove some explicit
positioning and browser-specific layout hacks.
- Rename user-select(), whose value is always the default of "none",
to unselectable().
- Remove unnecessary or redundant styles.
- Apply the same default styles to all control elements, whether
buttons, divs, or inputs.
- Make overlay-parent() and overlay-child() more resilient with
settings to fill space by default.
- Consolidate the setting of displayed & hidden in JS.
Pre-work for #1703, #1709 (IE style fixes)
Makes progress on b/116651454 (hard-coded offsets)
Change-Id: I7ea579429979afa98f5b2c54f68114312c4f508d
85 lines
2.5 KiB
Plaintext
85 lines
2.5 KiB
Plaintext
/**
|
|
* 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.
|
|
*/
|
|
|
|
/* General utility mixins and classes with broad applicability. */
|
|
|
|
/* Make a thing unselectable. There are currently no cases where we make it
|
|
* selectable again. */
|
|
.unselectable() {
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
}
|
|
|
|
.hidden() {
|
|
display: none;
|
|
}
|
|
|
|
/* For containers which host elements overlaying other things. */
|
|
.overlay-parent() {
|
|
/* For a detailed explanation of how this achieves an overlay, please refer
|
|
* to https://developer.mozilla.org/en-US/docs/Web/CSS/position .
|
|
*
|
|
* But you don't have to, because we've encapsulated these high level
|
|
* concepts into classes.
|
|
*
|
|
* This makes it possible for some children of this container to overlay the
|
|
* others using .overlay-child(). */
|
|
position: relative;
|
|
|
|
/* Make sure any top or left styles applied from outside don't move this from
|
|
* it's original position, now that it's relative to that original position.
|
|
* This is a defensive move that came out of intensive debugging on IE 11. */
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
|
|
/* For things which overlay other things. */
|
|
.overlay-child() {
|
|
/* For a detailed explanation of how this achieves an overlay, please refer
|
|
* to https://developer.mozilla.org/en-US/docs/Web/CSS/position .
|
|
*
|
|
* But you don't have to, because we've encapsulated these high level
|
|
* concepts into classes.
|
|
*
|
|
* This makes it possible for this child to overlay the other children of a
|
|
* .overlay-parent() object. */
|
|
position: absolute;
|
|
|
|
/* Fill the container by default. */
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* For things that should not shrink inside a flex container.
|
|
* This will be used for all controls by default. */
|
|
.unshrinkable() {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Use this to override .unshrinkable() in particular cases that *should* shrink
|
|
* inside a flex container. */
|
|
.shrinkable() {
|
|
flex-shrink: 1;
|
|
}
|