cyp/app/app.css
Ondrej Zara 0dacf6cf54 nav fix
2019-04-15 22:32:40 +02:00

776 lines
13 KiB
CSS

*,
*::before,
*::after {
box-sizing: inherit;
}
html {
background-color: var(--fg);
}
body {
display: flex;
flex-direction: column;
box-sizing: border-box;
font-family: lato, sans-serif;
line-height: 1.25;
background-color: var(--bg);
color: var(--fg);
text-shadow: var(--shadow);
max-width: 800px;
margin: 0 auto;
overflow: hidden;
height: 100vh;
}
body > header,
body > footer {
box-shadow: 0 0 3px #000;
}
input,
select,
button {
color: inherit;
font: inherit;
}
button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
display: flex;
flex-direction: row;
align-items: center;
display: inline-flex;
white-space: nowrap;
background-color: transparent;
padding: 0;
border: none;
line-height: 1;
cursor: pointer;
flex-shrink: 0;
}
select {
background-color: transparent;
border: 1px solid var(--fg);
border-radius: 4px;
padding: 2px 4px;
}
@font-face {
font-family: 'Lato';
src: url('font/LatoLatin-Regular.woff2') format('woff2');
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: 'Lato';
src: url('font/LatoLatin-bold.woff2') format('woff2');
font-style: bold;
font-weight: normal;
}
.icon {
width: 24px;
}
.icon path:not([fill]),
.icon polygon:not([fill]),
.icon circle:not([fill]) {
fill: currentColor;
}
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
}
.flex-column {
display: flex;
flex-direction: column;
}
.long-line {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.multiline {
display: flex;
flex-direction: row;
align-items: center;
}
.multiline h2 {
font-weight: normal;
}
main {
flex-grow: 1;
overflow: hidden;
}
nav ul {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: row;
align-items: center;
}
nav ul li {
flex: 1 0 0;
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
padding: 4px 0 8px 0;
border-top: 4px solid transparent;
}
nav ul li .icon {
margin-right: 4px;
}
nav ul li.active {
border-top-color: var(--primary);
color: var(--primary);
background-color: rgb(var(--primary-raw), 0.1);
}
@media (max-width: 480px) {
nav ul li {
flex-direction: row;
justify-content: center;
}
nav ul li:not([data-for=queue]) .icon {
margin-right: 0;
}
nav ul li span:not([id]) {
display: none;
}
}
#player {
display: flex;
flex-direction: row;
align-items: center;
align-items: stretch;
}
#player:not([data-state=play]) .pause {
display: none;
}
#player[data-state=play] .play {
display: none;
}
#player:not([data-flags~=random]) .random,
#player:not([data-flags~=repeat]) .repeat {
opacity: 0.5;
}
#player [type=range] {
margin: 0;
width: 0;
flex-grow: 1;
}
#player .art {
margin-right: 0;
height: 96px;
}
#player .art img,
#player .art .icon {
width: 96px;
}
#player .info {
flex-grow: 2;
flex-basis: 0;
padding-left: var(--icon-spacing);
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-around;
}
#player .info h2 {
font-size: 125%;
margin: 0;
}
#player .info .title,
#player .info .subtitle {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#player .timeline {
display: flex;
flex-direction: row;
align-items: center;
}
#player .timeline .duration,
#player .timeline .elapsed {
flex-basis: 5ch;
text-align: center;
}
#player .controls {
flex-grow: 1;
flex-basis: 0;
max-width: 220px;
display: flex;
flex-direction: column;
justify-content: space-around;
}
#player .controls .playback {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
}
#player .controls .playback .icon {
width: 40px;
}
#player .controls .playback .icon-play,
#player .controls .playback .icon-pause {
width: 64px;
}
#player .controls .volume {
display: flex;
flex-direction: row;
align-items: center;
}
#player .controls .volume .mute {
margin-right: 4px;
}
#player .misc {
display: flex;
flex-direction: column;
align-self: stretch;
justify-content: space-around;
}
#player .misc .icon {
width: 32px;
}
@media (max-width: 519px) {
#player {
flex-wrap: wrap;
justify-content: space-between;
}
#player .info {
order: 1;
flex-basis: 100%;
height: 96px;
}
}
.component {
height: 100%;
display: flex;
flex-direction: column;
}
.component header {
display: flex;
flex-direction: row;
align-items: center;
padding: 8px;
}
.component header button {
font-size: var(--font-size-large);
font-weight: bold;
}
.component header button .icon {
margin-right: var(--icon-spacing);
}
.component ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
.component li {
display: flex;
flex-direction: row;
align-items: center;
}
.component li .info {
flex-grow: 1;
overflow: hidden;
}
.component li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
filter: drop-shadow(var(--shadow));
}
.component li .info h2 {
font-size: var(--font-size-large);
margin: 0;
}
.component li .info h2,
.component li .info div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.component li:not(.has-art) {
padding: 8px;
}
.component li button .icon {
width: 32px;
}
.component li:nth-child(odd) {
background-color: var(--bg-alt);
}
#queue {
height: 100%;
display: flex;
flex-direction: column;
}
#queue header {
display: flex;
flex-direction: row;
align-items: center;
padding: 8px;
}
#queue header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#queue header button .icon {
margin-right: var(--icon-spacing);
}
#queue ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
#queue li {
display: flex;
flex-direction: row;
align-items: center;
}
#queue li .info {
flex-grow: 1;
overflow: hidden;
}
#queue li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
filter: drop-shadow(var(--shadow));
}
#queue li .info h2 {
font-size: var(--font-size-large);
margin: 0;
}
#queue li .info h2,
#queue li .info div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#queue li:not(.has-art) {
padding: 8px;
}
#queue li button .icon {
width: 32px;
}
#queue li:nth-child(odd) {
background-color: var(--bg-alt);
}
#queue .current {
color: var(--primary);
}
#library {
height: 100%;
display: flex;
flex-direction: column;
}
#library header {
display: flex;
flex-direction: row;
align-items: center;
padding: 8px;
}
#library header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#library header button .icon {
margin-right: var(--icon-spacing);
}
#library ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
#library li {
display: flex;
flex-direction: row;
align-items: center;
}
#library li .info {
flex-grow: 1;
overflow: hidden;
}
#library li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
filter: drop-shadow(var(--shadow));
}
#library li .info h2 {
font-size: var(--font-size-large);
margin: 0;
}
#library li .info h2,
#library li .info div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#library li:not(.has-art) {
padding: 8px;
}
#library li button .icon {
width: 32px;
}
#library li:nth-child(odd) {
background-color: var(--bg-alt);
}
#library header {
white-space: pre;
}
#library .search {
order: 1;
}
#library .search.open ~ * {
display: none;
}
#library .art img,
#library .art .icon {
width: 64px;
}
#library .art .icon {
filter: drop-shadow(var(--shadow));
}
#library .group {
cursor: pointer;
}
#library .group h2 {
font-weight: normal;
}
#library .tiles {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 2px;
}
#library .tiles li {
text-align: center;
cursor: pointer;
background-color: rgba(255, 255, 255, 0.08);
height: 200px;
}
#library .tiles li h2 {
font-size: 150%;
margin: 4px 0;
}
#fs {
height: 100%;
display: flex;
flex-direction: column;
}
#fs header {
display: flex;
flex-direction: row;
align-items: center;
padding: 8px;
}
#fs header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#fs header button .icon {
margin-right: var(--icon-spacing);
}
#fs ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
#fs li {
display: flex;
flex-direction: row;
align-items: center;
}
#fs li .info {
flex-grow: 1;
overflow: hidden;
}
#fs li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
filter: drop-shadow(var(--shadow));
}
#fs li .info h2 {
font-size: var(--font-size-large);
margin: 0;
}
#fs li .info h2,
#fs li .info div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#fs li:not(.has-art) {
padding: 8px;
}
#fs li button .icon {
width: 32px;
}
#fs li:nth-child(odd) {
background-color: var(--bg-alt);
}
#fs header {
white-space: pre;
}
#fs .search {
order: 1;
}
#fs .search.open ~ * {
display: none;
}
#fs .group {
cursor: pointer;
}
#fs .info {
display: flex;
flex-direction: row;
align-items: center;
}
#fs .info h2 {
font-weight: normal;
}
#playlists {
height: 100%;
display: flex;
flex-direction: column;
}
#playlists header {
display: flex;
flex-direction: row;
align-items: center;
padding: 8px;
}
#playlists header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#playlists header button .icon {
margin-right: var(--icon-spacing);
}
#playlists ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
#playlists li {
display: flex;
flex-direction: row;
align-items: center;
}
#playlists li .info {
flex-grow: 1;
overflow: hidden;
}
#playlists li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
filter: drop-shadow(var(--shadow));
}
#playlists li .info h2 {
font-size: var(--font-size-large);
margin: 0;
}
#playlists li .info h2,
#playlists li .info div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#playlists li:not(.has-art) {
padding: 8px;
}
#playlists li button .icon {
width: 32px;
}
#playlists li:nth-child(odd) {
background-color: var(--bg-alt);
}
#playlists .info {
display: flex;
flex-direction: row;
align-items: center;
}
#playlists .info h2 {
font-weight: normal;
}
#yt {
height: 100%;
display: flex;
flex-direction: column;
}
#yt header {
display: flex;
flex-direction: row;
align-items: center;
padding: 8px;
}
#yt header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#yt header button .icon {
margin-right: var(--icon-spacing);
}
#yt ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
#yt li {
display: flex;
flex-direction: row;
align-items: center;
}
#yt li .info {
flex-grow: 1;
overflow: hidden;
}
#yt li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
filter: drop-shadow(var(--shadow));
}
#yt li .info h2 {
font-size: var(--font-size-large);
margin: 0;
}
#yt li .info h2,
#yt li .info div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#yt li:not(.has-art) {
padding: 8px;
}
#yt li button .icon {
width: 32px;
}
#yt li:nth-child(odd) {
background-color: var(--bg-alt);
}
#yt header {
border-bottom: 1px solid var(--fg);
}
#yt header button + button {
margin-left: 16px;
}
#yt .clear {
margin-left: auto;
}
#yt pre {
margin: 0.5em 0.5ch;
flex-grow: 1;
overflow: auto;
white-space: pre-wrap;
}
#yt.pending header {
background-image: linear-gradient(var(--primary), var(--primary));
background-repeat: no-repeat;
background-size: 25% 4px;
animation: bar ease-in-out 3s alternate infinite;
}
@keyframes bar {
0% {
background-position: 0 100%;
}
100% {
background-position: 100% 100%;
}
}
#settings {
font-size: var(--font-size-large);
}
#settings dl {
margin: 8px;
display: grid;
grid-template-columns: max-content 1fr;
align-items: center;
grid-gap: 8px;
}
#settings dt {
font-weight: bold;
}
#settings dd {
margin: 0;
display: flex;
flex-direction: column;
align-items: start;
}
#settings label {
display: flex;
flex-direction: row;
align-items: center;
}
#settings label [type=radio],
#settings label [type=checkbox] {
margin: 0 4px 0 0;
}
.search {
display: flex;
flex-direction: row;
align-items: center;
margin-left: auto;
transition: all 300ms;
width: 32px;
max-width: 20ch;
}
.search .icon {
width: 32px;
cursor: pointer;
}
.search input {
border: none;
outline: none;
color: inherit;
background-color: inherit;
border-bottom: 1px solid var(--fg);
width: 0;
padding: 0;
flex-grow: 1;
}
.search.open {
flex: 1;
}
.art {
margin-right: var(--icon-spacing);
}
.art .icon,
.art img {
vertical-align: top;
}
:root {
--font-size-large: 112.5%;
--icon-spacing: 4px;
--primary: rgb(var(--primary-raw));
}
:root[data-theme=light] {
--fg: #333;
--bg: #f0f0f0;
--bg-alt: #e0e0e0;
--shadow: none;
}
:root[data-theme=dark] {
--fg: #f0f0f0;
--bg: #333;
--bg-alt: #555;
--shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}
:root[data-color=dodgerblue] {
--primary-raw: 30, 144, 255;
}
:root[data-color=darkorange] {
--primary-raw: 255, 140, 0;
}
:root[data-color=limegreen] {
--primary-raw: 50, 205, 50;
}