styles.css 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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: #ddd;
  39. --background: #222;
  40. }
  41. /* Font */
  42. body {
  43. font-family: Arial, Helvetica, sans-serif;
  44. }
  45. /* Composition */
  46. .flex {
  47. display: flex;
  48. gap: var(--gap, 1rem);
  49. }
  50. .even {
  51. justify-content: space-between;
  52. align-items: stretch;
  53. }
  54. .col {
  55. flex-direction: column;
  56. }
  57. .grid {
  58. display: grid;
  59. gap: var(--gap, 1rem);
  60. }
  61. .flow > * + * {
  62. margin-block-start: var(--flow-space, 1rem);
  63. }
  64. .no-gap {
  65. --gap: 0px;
  66. }
  67. .small-gap {
  68. --gap: 0.5rem;
  69. }
  70. .big-gap {
  71. --gap: 1.5rem;
  72. }
  73. .section {
  74. padding-block-start: var(--flow-space, 1rem);
  75. padding-inline: var(--flow-space-inline, 1ch);
  76. }
  77. /* Utility */
  78. .emphasis {
  79. font-size: 1.125rem;
  80. font-weight: 600;
  81. }
  82. .center {
  83. text-align: center;
  84. margin-inline: auto;
  85. }
  86. .margin-after {
  87. margin-block-end: 0.5rem;
  88. }
  89. button {
  90. border-radius: 100vmax;
  91. padding-block: 0.25rem;
  92. border: 1px solid var(--highlight);
  93. transition: background-color 100ms;
  94. }
  95. button.color-select {
  96. background-color: var(--button-bg);
  97. }
  98. button.color-select:hover {
  99. background-color: var(--button-bg-hover);
  100. }
  101. /* Block */
  102. body {
  103. color: var(--highlight);
  104. background-color: var(--background);
  105. accent-color: var(--highlight);
  106. transition: accent-color 250ms, color 250ms, background-color 250ms;
  107. display: grid;
  108. grid-template-columns: 14rem 1fr 8rem;
  109. }
  110. body > * + * {
  111. border-inline-start: 1px solid var(--highlight);
  112. }
  113. hr {
  114. color: var(--highlight);
  115. }
  116. #prevColors button {
  117. width: 100%;
  118. margin-block-end: 0.5ch;
  119. }
  120. #targetSelect input[type="text"] {
  121. border-radius: 100vmax;
  122. text-align: center;
  123. border: 1px solid var(--highlight);
  124. min-width: 0px;
  125. }
  126. #targetSelect input[type="color"] {
  127. flex: 0 0 2rem;
  128. }
  129. #sidebar select:disabled {
  130. display: none;
  131. }
  132. .fn-fraction > *:first-child {
  133. padding-bottom: 2px;
  134. border-block-end: 1px solid var(--highlight);
  135. }
  136. :is(#cls-fn-mount, #cls-metric-mount) form {
  137. transition: opacity 200ms;
  138. }
  139. [data-faded="true"] {
  140. opacity: 25%;
  141. }
  142. .pkmn-tile img {
  143. height: 64px;
  144. }
  145. .pkmn-tile button {
  146. font-size: 0.85rem;
  147. font-weight: 600;
  148. padding-inline: 1ch; /* TODO remove this after using grid for layout*/
  149. }
  150. .pkmn-tile button[data-best="true"]::before {
  151. content: "▸";
  152. display: inline-block;
  153. width: 1ch;
  154. margin-inline: 0.25ch;
  155. }