mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 17:18:52 +00:00
This allows the individual windows to be positon: fixed and still scroll with the window.
133 lines
3.2 KiB
CSS
133 lines
3.2 KiB
CSS
/* Rules used by all windows */
|
|
|
|
#webamp {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
/*
|
|
* Force a new rendering context. This allows the individual windows to be
|
|
* positioned `fixed` relative to their parent (this div).
|
|
* We need individual windows to be `position: fixed;` so that they don't
|
|
* affect the scroll size of the browser window. If they did affect the
|
|
* scroll size of the browser window, we would be unable to detect the
|
|
* natural size of the window to reposition ourselves when the browser
|
|
* window size changes.
|
|
*
|
|
* It's worth noting that this won't work in IE, but that's okay, because
|
|
* we don't work in IE anyway. `Webamp.browserIsSupported()` will return
|
|
* false because IE does not support the Web Audio API.
|
|
*
|
|
* - https://github.com/captbaritone/webamp/pull/669#issuecomment-427225148
|
|
* - https://stackoverflow.com/a/38796408/1263117
|
|
* - https://stackoverflow.com/a/20830413/1263117
|
|
*/
|
|
|
|
transform: translateZ(0);
|
|
}
|
|
|
|
/* Prevent accidental highlighting */
|
|
#webamp canvas {
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
#webamp * {
|
|
/* Some environments globably change the box-sizing */
|
|
box-sizing: content-box;
|
|
-webkit-box-sizing: content-box;
|
|
}
|
|
|
|
#webamp *:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
/* Range input css reset */
|
|
#webamp input[type="range"] {
|
|
-webkit-appearance: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
background: none;
|
|
border: none;
|
|
}
|
|
#webamp input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
border: none;
|
|
border-radius: 0;
|
|
background: none;
|
|
}
|
|
#webamp input[type="range"]::-moz-range-thumb {
|
|
border: none;
|
|
border-radius: 0;
|
|
background: none;
|
|
}
|
|
#webamp input[type="range"]::-moz-range-track {
|
|
border: none;
|
|
background: none;
|
|
}
|
|
#webamp input[type="range"]:focus {
|
|
outline: none;
|
|
}
|
|
#webamp input[type="range"]::-moz-focus-outer {
|
|
border: 0;
|
|
}
|
|
|
|
#webamp a:focus {
|
|
outline: none;
|
|
}
|
|
|
|
/* Animation */
|
|
@keyframes blink {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
@-webkit-keyframes blink {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
#webamp .character {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
width: 5px;
|
|
height: 6px;
|
|
/* background-image: TEXT.BMP via Javascript */
|
|
text-indent: -9999px;
|
|
}
|
|
|
|
#webamp .window {
|
|
position: absolute;
|
|
/* Ask the browser to scale showing large pixels if possible */
|
|
image-rendering: -moz-crisp-edges; /* Firefox */
|
|
image-rendering: -o-crisp-edges; /* Opera */
|
|
image-rendering: -webkit-optimize-contrast; /* Safari */
|
|
image-rendering: pixelated; /* Only in Chrome > 40 */
|
|
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
|
|
|
|
/* Work around rendering bug with clip-path */
|
|
-webkit-transform: translateZ(0);
|
|
transform: translateZ(0);
|
|
}
|
|
|
|
#webamp .window.doubled {
|
|
transform: translateZ(0) scale(2);
|
|
transform-origin: top left;
|
|
-moz-transform: translateZ(0) scale(2);
|
|
-moz-transform-origin: top left;
|
|
-webkit-transform: translateZ(0) scale(2);
|
|
-webkit-transform-origin: top left;
|
|
}
|