styles.css 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. .section {
  71. padding-block-start: var(--flow-space, 1rem);
  72. padding-inline: calc(var(--flow-space, 1rem) / 2);
  73. }
  74. /* Utility */
  75. .emphasis {
  76. font-size: 1.125rem;
  77. font-weight: 600;
  78. }
  79. .center {
  80. text-align: center;
  81. margin-inline: auto;
  82. }
  83. button {
  84. border-radius: 100vmax;
  85. padding-block: 0.25rem;
  86. border: 1px solid var(--highlight);
  87. }
  88. /* Block */
  89. body {
  90. color: var(--highlight);
  91. background-color: var(--background);
  92. accent-color: var(--highlight);
  93. transition: accent-color 250ms, color 250ms, background-color 250ms;
  94. display: grid;
  95. grid-template-columns: 14rem 1fr 8rem;
  96. }
  97. body > * + * {
  98. border-inline-start: 1px solid var(--highlight);
  99. }
  100. #prevColors button {
  101. width: 100%;
  102. margin-block-end: 0.5ch;
  103. background-color: var(--button-bg);
  104. transition: background-color 100ms;
  105. }
  106. #prevColors button:hover {
  107. background-color: var(--button-bg-hover);
  108. }
  109. #colorSelect label {
  110. text-align: center;
  111. }
  112. #colorSelect input[type="text"] {
  113. border-radius: 100vmax;
  114. padding-inline: 1rem;
  115. text-align: center;
  116. border: 1px solid var(--highlight);
  117. min-width: 0px;
  118. }
  119. #colorSelect input[type="color"] {
  120. flex: 0 0 2rem;
  121. }
  122. #sidebar select:disabled {
  123. display: none;
  124. }