Controls.css 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. .App {
  2. --controls-background: #EEE;
  3. --controls-button-background: rgb(240,240,240);
  4. --controls-button-hover-background: rgba(0,0,0,0.2);
  5. --controls-button-hover-disabled: rgba(0,0,0,0.1);
  6. }
  7. .App[data-theme='dark'] {
  8. --controls-background: rgba(255,255,255,12%);
  9. --controls-button-background: rgba(240,240,240, 12%);
  10. }
  11. .App[data-theme='dark'] button {
  12. background: var(--controls-background);
  13. border: 1px transparent;
  14. }
  15. .App[data-theme='dark'] svg path {
  16. fill: var(--text-color);
  17. }
  18. .Controls {
  19. display: grid;
  20. grid: "progress progress progress progress" auto
  21. "cover buttons time title" auto
  22. "cover buttons time album" auto
  23. "cover buttons time artist" auto
  24. / auto auto 1fr 10fr;
  25. background-color: var(--controls-background);
  26. align-items: center;
  27. grid-column-gap: 16px;
  28. padding-bottom: 4px;
  29. }
  30. .App[data-layout='left'] .Controls,
  31. .App[data-layout='right'] .Controls {
  32. grid: "cover cover" auto
  33. "progress progress" auto
  34. "buttons time" auto
  35. "title title" auto
  36. "album album" auto
  37. "artist artist" 1fr
  38. / auto 1fr;
  39. grid-column-gap: 0;
  40. width: 300px;
  41. }
  42. .App[data-layout='left'] .Controls img,
  43. .App[data-layout='right'] .Controls img {
  44. width: 300px;
  45. height: 300px;
  46. }
  47. .App[data-layout='left'] .Controls-artist,
  48. .App[data-layout='right'] .Controls-artist {
  49. align-self: start;
  50. }
  51. .App[data-layout='left'] .Controls > div,
  52. .App[data-layout='right'] .Controls > div {
  53. padding: 4px 8px;
  54. }
  55. .Controls-progress {
  56. grid-area: progress;
  57. }
  58. .Controls progress {
  59. -webkit-appearance: none;
  60. -moz-appearance: none;
  61. appearance: none;
  62. width: 100%;
  63. height: 8.4px;
  64. pointer-events: none;
  65. box-sizing: border-box;
  66. border: 0;
  67. display: block;
  68. background-color: var(--controls-background);
  69. }
  70. .Controls progress::-webkit-progress-bar {
  71. background-color: var(--controls-background);
  72. }
  73. .Controls progress::-webkit-progress-value {
  74. background: var(--accent);
  75. border-radius: 1px;
  76. }
  77. .Controls progress::-moz-progress-bar {
  78. background: var(--accent);
  79. border-radius: 2px;
  80. }
  81. .Controls-time {
  82. grid-area: time;
  83. justify-self: center;
  84. }
  85. .Controls img {
  86. grid-area: cover;
  87. width: 64px;
  88. }
  89. .Controls-artist { grid-area: artist; }
  90. .Controls-album { grid-area: album; }
  91. .Controls-title { grid-area: title; }
  92. .Controls-error { grid-area: title; }
  93. .Controls-buttons {
  94. grid-area: buttons;
  95. display: grid;
  96. grid-template-columns: repeat(4, auto);
  97. align-items: center;
  98. grid-column-gap: 8px;
  99. justify-self: left;
  100. }
  101. .Controls-buttons button {
  102. height: 32px;
  103. width: 32px;
  104. padding: 0;
  105. border: 0;
  106. border-radius: 4px;
  107. cursor: pointer;
  108. background: var(--button-background);
  109. }
  110. .Controls-buttons button:hover {
  111. background: var(--controls-button-hover-background);
  112. }
  113. .Controls-buttons button:disabled {
  114. background: var(--controls-button-hover-disabled);
  115. cursor: initial;
  116. }
  117. .Controls-buttons button:nth-child(2) {
  118. height: 48px;
  119. width: 48px;
  120. }
  121. @media screen and (max-width: 800px) {
  122. .Controls {
  123. grid: "progress progress progress" auto
  124. "cover buttons time" auto
  125. "cover title artist" auto
  126. "album album album" auto
  127. / auto auto 1fr;
  128. grid-column-gap: 4px;
  129. }
  130. .Controls-buttons {
  131. grid-column-gap: 10px;
  132. }
  133. .Controls progress {
  134. height: 4px;
  135. }
  136. .Controls-album {
  137. padding: 0 8px;
  138. }
  139. .Controls-artist {
  140. min-width: 25vw;
  141. padding: 0 8px;
  142. text-align: right;
  143. }
  144. .Controls-time {
  145. justify-self: right;
  146. padding-right: 8px;
  147. }
  148. }