settings.css 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. body {
  2. display: grid;
  3. grid-gap: 20px;
  4. grid-template-areas:
  5. "header"
  6. "main"
  7. "footer";
  8. /* Fix height */
  9. height: 100vh;
  10. grid-template-rows: auto 1fr auto;
  11. /* fix top and bottom */
  12. margin-left: 1rem;
  13. margin-right: 1rem;
  14. }
  15. a:link {
  16. color: var(--link);
  17. }
  18. a:visited {
  19. color: var(--link-visited);
  20. }
  21. input[type="text"],
  22. input[type="search"] {
  23. background: var(--background);
  24. border: 1px solid var(--button-border);
  25. border-radius: 5px;
  26. padding: 0.4rem 0.4rem;
  27. font-size: 15px;
  28. color: var(--search-text);
  29. outline: none;
  30. box-shadow: none;
  31. }
  32. input[type='search'] {
  33. border-bottom: 1px solid var(--button-border);
  34. border-top: 0px;
  35. border-left: 0px;
  36. border-right: 0px;
  37. border-radius: 0px;
  38. }
  39. header {
  40. display: grid;
  41. grid-gap: 1px;
  42. grid-template-areas:
  43. "home"
  44. "form";
  45. grid-area: header;
  46. }
  47. .home {
  48. grid-area: home;
  49. margin-left: auto;
  50. margin-right: auto;
  51. margin-bottom: 1rem;
  52. margin-top: 1rem;
  53. }
  54. .form {
  55. display: grid;
  56. grid-gap: 4px;
  57. grid-template-areas:
  58. "search-box"
  59. "search-button"
  60. "dropdown";
  61. grid-area: form;
  62. }
  63. .search-box {
  64. grid-area: search-box;
  65. }
  66. .search-button {
  67. grid-area: search-button;
  68. cursor: pointer;
  69. padding-bottom: 6px;
  70. padding-left: .75em;
  71. padding-right: .75em;
  72. padding-top: 6px;
  73. text-align: center;
  74. white-space: nowrap;
  75. background-color: var(--buttom);
  76. border: 1px solid var(--button-border);
  77. color: var(--buttom-text);
  78. border-radius: 5px;
  79. }
  80. .search-button:hover {
  81. background-color: var(--buttom-hover);
  82. }
  83. .dropdown {
  84. display: grid;
  85. grid-gap: 1px;
  86. grid-template-areas:
  87. "dropdown-label"
  88. "dropdown-content";
  89. grid-area: dropdown;
  90. }
  91. .dropdown-label {
  92. grid-area: dropdown-label;
  93. padding-bottom: 6px;
  94. padding-left: .75em;
  95. padding-right: .75em;
  96. padding-top: 6px;
  97. text-align: center;
  98. white-space: nowrap;
  99. background-color: var(--buttom);
  100. border: 1px solid var(--button-border);
  101. color: var(--buttom-text);
  102. border-radius: 5px;
  103. }
  104. .dropdown-label:hover {
  105. background-color: var(--buttom-hover);
  106. }
  107. /* ------------- Menu Mobile sin JS ---------------- */
  108. /* input hidden */
  109. .opt-box {
  110. display: none;
  111. }
  112. .dropdown-content {
  113. display: none;
  114. grid-area: dropdown-content;
  115. }
  116. label[for=options-toggle-cbox] {
  117. cursor: pointer;
  118. -webkit-touch-callout: none;
  119. -webkit-user-select: none;
  120. -khtml-user-select: none;
  121. -moz-user-select: none;
  122. -ms-user-select: none;
  123. user-select: none;
  124. }
  125. #options-toggle-cbox:checked ~ .dropdown-content {
  126. display: block;
  127. white-space: nowrap;
  128. background: var(--secondary-background);
  129. padding: 0.5rem 1rem;
  130. }
  131. /*- ----------- End Menu Mobile sin JS ------------- */
  132. .main {
  133. grid-area: main;
  134. margin: 0 auto;
  135. width: 100%;
  136. }
  137. .settings-form {
  138. background-color: var(--secondary-background);
  139. padding: 1rem;
  140. }
  141. .settings-form > h2 {
  142. border-bottom: 2px solid var(--border-bg-settings);
  143. padding-bottom: 0.5rem;
  144. }
  145. .settings-list {
  146. display: grid;
  147. grid-row-gap: 1rem;
  148. list-style: none;
  149. padding: 0px;
  150. }
  151. .setting-item {
  152. display: grid;
  153. grid-template-columns: auto auto;
  154. align-items: center;
  155. padding: 5px;
  156. }
  157. .setting-item select {
  158. max-width: 100%;
  159. justify-self: end;
  160. }
  161. .setting-item input {
  162. max-width: 80px;
  163. justify-self: end;
  164. }
  165. .settings-form input[type="submit"] {
  166. cursor: pointer;
  167. }
  168. .footer {
  169. grid-area: footer;
  170. display: grid;
  171. grid-template-columns: auto;
  172. align-items: center;
  173. justify-content: center;
  174. margin: auto;
  175. text-align: center;
  176. }
  177. .footer > p {
  178. text-align: center;
  179. }
  180. @media (min-width: 780px) {
  181. body {
  182. display: grid;
  183. grid-template-columns: 0.3fr 2fr 1fr 0.3fr;
  184. grid-template-rows: auto 1fr auto;
  185. grid-template-areas:
  186. "header header header header"
  187. "main main main main"
  188. "footer footer footer footer";
  189. }
  190. .form {
  191. display: grid;
  192. grid-gap: 1px;
  193. grid-template-columns: 1fr 1.4fr 0.3fr 1.3fr;
  194. grid-template-areas: ". search-box search-button dropdown";
  195. grid-area: form;
  196. position: relative;
  197. }
  198. .dropdown {
  199. display: grid;
  200. grid-gap: 1px;
  201. grid-template-columns: 100px auto;
  202. grid-template-areas:
  203. "dropdown-label"
  204. "dropdown-content";
  205. grid-area: dropdown;
  206. position: absolute;
  207. z-index: 1;
  208. }
  209. #options-toggle-cbox:checked ~ .dropdown-content {
  210. width: calc(100% + 100px);
  211. max-height: 80vh;
  212. overflow-y: scroll;
  213. }
  214. .main {
  215. display: grid;
  216. justify-content: center;
  217. }
  218. .settings-form {
  219. width: 50vw;
  220. }
  221. .setting-item select {
  222. max-width: 250px;
  223. }
  224. .setting-item input {
  225. max-width: 250px;
  226. }
  227. .footer {
  228. display: grid;
  229. grid-template-columns: repeat(3, 1fr);
  230. grid-column-gap: 2rem;
  231. align-items: center;
  232. justify-content: center;
  233. text-align: center;
  234. margin-top: 1rem;
  235. margin-bottom: 1rem;
  236. }
  237. }