styles.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /* Reset */
  2. *,
  3. *::before,
  4. *::after {
  5. box-sizing: border-box;
  6. }
  7. * {
  8. margin: 0;
  9. padding: 0;
  10. }
  11. html {
  12. color-scheme: dark light;
  13. }
  14. body {
  15. min-height: 100vh;
  16. }
  17. img,
  18. picture,
  19. video,
  20. canvas,
  21. svg {
  22. display: block;
  23. max-width: 100%;
  24. }
  25. input,
  26. button,
  27. textarea,
  28. select {
  29. font: inherit;
  30. }
  31. /* Colors */
  32. :root {
  33. --color-dark: #1f2123;
  34. --color-light: #e8e6e3;
  35. }
  36. :root {
  37. /* separated since these are used by the actual script */
  38. --highlight: var(--color-light);
  39. --background: var(--color-dark);
  40. --shadow-component: 255;
  41. --shadow: rgb(
  42. var(--shadow-component),
  43. var(--shadow-component),
  44. var(--shadow-component),
  45. 0.2
  46. );
  47. }
  48. /* Font */
  49. body {
  50. font-family: Arial, Helvetica, sans-serif;
  51. }
  52. /* Composition */
  53. .flex {
  54. display: flex;
  55. gap: var(--gap, 1rem);
  56. }
  57. .even {
  58. justify-content: space-between;
  59. align-items: stretch;
  60. }
  61. .wrap {
  62. flex-wrap: wrap;
  63. }
  64. .col {
  65. flex-direction: column;
  66. }
  67. .grid {
  68. display: grid;
  69. gap: var(--gap, 1rem);
  70. }
  71. .flow > * + * {
  72. margin-block-start: var(--flow-space, 1rem);
  73. }
  74. .no-gap {
  75. --gap: 0px;
  76. }
  77. .small-gap {
  78. --gap: 0.5rem;
  79. }
  80. .big-gap {
  81. --gap: 1.5rem;
  82. }
  83. .section {
  84. padding-block-start: var(--flow-space, 1rem);
  85. padding-inline: var(--flow-space-inline, 1ch);
  86. }
  87. /* Utility */
  88. .emphasis {
  89. font-size: 1.125rem;
  90. font-weight: 600;
  91. }
  92. .center {
  93. text-align: center;
  94. margin-inline: auto;
  95. }
  96. .block-center {
  97. margin-block: auto;
  98. }
  99. .right {
  100. text-align: end;
  101. }
  102. .ellipsis {
  103. overflow: hidden;
  104. text-overflow: ellipsis;
  105. white-space: nowrap;
  106. }
  107. .margin-after {
  108. margin-block-end: 0.5rem;
  109. }
  110. button {
  111. border-radius: 100vmax;
  112. padding-block: 0.25rem;
  113. border: 1px solid var(--highlight);
  114. transition: background-color 100ms;
  115. }
  116. button.color-select {
  117. background-color: var(--button-bg);
  118. }
  119. button.color-select:hover {
  120. background-color: var(--button-bg-hover);
  121. }
  122. /* Block */
  123. body {
  124. color: var(--highlight);
  125. background-color: var(--background);
  126. accent-color: var(--highlight);
  127. transition: accent-color 250ms, color 250ms, background-color 250ms;
  128. display: grid;
  129. grid-template-columns: 14rem 1fr 8rem;
  130. }
  131. body > * + :not(#sidebar) {
  132. border-inline-start: 1px solid var(--highlight);
  133. }
  134. hr {
  135. color: var(--highlight);
  136. }
  137. #prevColors button {
  138. width: 100%;
  139. margin-block-end: 0.5ch;
  140. }
  141. #targetSelect input[type="text"] {
  142. border-radius: 100vmax;
  143. text-align: center;
  144. border: 1px solid var(--highlight);
  145. min-width: 0px;
  146. }
  147. #targetSelect input[type="color"] {
  148. flex: 0 0 2rem;
  149. }
  150. #sidebar select:disabled {
  151. display: none;
  152. }
  153. .fn-fraction > *:first-child {
  154. padding-bottom: 2px;
  155. border-block-end: 1px solid var(--highlight);
  156. }
  157. :is(#cls-fn-mount, #cls-metric-mount) form {
  158. transition: opacity 200ms;
  159. }
  160. [data-faded="true"] {
  161. opacity: 25%;
  162. }
  163. .pkmn-tile img {
  164. height: 64px;
  165. }
  166. .pkmn-tile button {
  167. font-size: 0.85rem;
  168. font-weight: 600;
  169. padding-inline: 1ch; /* TODO remove this after using grid for layout*/
  170. }
  171. .pkmn-tile button[data-best="true"]::before {
  172. content: "▸";
  173. display: inline-block;
  174. width: 1ch;
  175. margin-inline: 0.25ch;
  176. }