controls.scss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. @import "variables";
  2. textarea {
  3. margin-bottom: 20px;
  4. border: 1px solid $color-primary-0;
  5. background: $color-white;
  6. font-family: Tahoma, Arial, Helvetica, sans-serif;
  7. font-size: 1rem;
  8. border-radius: $border-radius;
  9. width: 100%;
  10. display: block;
  11. }
  12. input[type="text"],
  13. input[type="password"],
  14. .button,
  15. button {
  16. width: 100%;
  17. height: 30px;
  18. margin-bottom: 20px;
  19. font-family: Tahoma, Arial, Helvetica, sans-serif;
  20. font-size: 1rem;
  21. border-radius: $border-radius;
  22. background: $color-white;
  23. color: $color-primary-2;
  24. border: 1px solid $color-primary-0;
  25. &:disabled {
  26. opacity: 0.5;
  27. }
  28. }
  29. input[type="text"],
  30. input[type="password"],
  31. textarea {
  32. padding-inline-start: 10px;
  33. &:focus,
  34. &:hover {
  35. &:not(:disabled) {
  36. border-color: $color-primary-2;
  37. }
  38. }
  39. &:focus {
  40. box-shadow: 0 0 1px 1px $color-primary-3;
  41. }
  42. }
  43. .button,
  44. button {
  45. &:hover {
  46. border-color: $color-primary-2;
  47. box-shadow: 0 0 1px 1px $color-primary-3;
  48. cursor: pointer;
  49. }
  50. }
  51. .button {
  52. text-align: center;
  53. line-height: 28px;
  54. }
  55. .button-group {
  56. display: grid;
  57. grid-gap: 20px;
  58. grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  59. > .button,
  60. > button {
  61. margin: 0;
  62. }
  63. }
  64. input:placeholder-shown {
  65. text-overflow: ellipsis;
  66. }
  67. input[type="search"] {
  68. border: none;
  69. background: none;
  70. outline: none;
  71. box-shadow: none;
  72. }
  73. .search-block {
  74. margin-bottom: 20px;
  75. background-color: $color-white;
  76. border-radius: $border-radius;
  77. position: relative;
  78. align-self: flex-end;
  79. .search {
  80. position: relative;
  81. min-height: 50px;
  82. margin-left: 10px;
  83. margin-right: 10px;
  84. display: flex;
  85. flex-direction: column-reverse;
  86. > input {
  87. height: 2.5rem;
  88. font-size: 1.25rem;
  89. color: $color-grey;
  90. padding-inline-start: 20px;
  91. transition: color 100ms linear;
  92. + .placeholder {
  93. position: absolute;
  94. top: 50%;
  95. left: 40px;
  96. transform: translateY(-50%);
  97. color: $color-grey;
  98. font-size: 1.25rem;
  99. font-weight: 700;
  100. user-select: none;
  101. pointer-events: none;
  102. transition: all 100ms linear;
  103. + .line {
  104. position: absolute;
  105. bottom: 0;
  106. left: 0;
  107. right: 100%;
  108. height: 2px;
  109. background-color: $color-grey;
  110. transition: right 100ms linear;
  111. }
  112. }
  113. ~ .fa-search {
  114. position: absolute;
  115. font-size: 2rem;
  116. top: 50%;
  117. color: $color-grey;
  118. transform: translateY(-50%);
  119. transition: font-size 100ms linear, top 100ms linear;
  120. }
  121. &:valid,
  122. &:focus {
  123. color: $color-black;
  124. + .placeholder {
  125. font-size: 0.9rem;
  126. top: 0;
  127. left: 0;
  128. transform: translateY(0);
  129. color: $color-black;
  130. + .line {
  131. right: 0;
  132. }
  133. }
  134. ~ .fa-search {
  135. font-size: 1rem;
  136. top: 65%;
  137. }
  138. }
  139. }
  140. + .search-list {
  141. display: none;
  142. position: absolute;
  143. top: 100%;
  144. left: 0;
  145. right: 0;
  146. background-color: $color-secondary-b-4;
  147. padding: 20px;
  148. z-index: 90;
  149. h3 {
  150. color: $color-green-700;
  151. padding-bottom: 5px;
  152. border-bottom: 1px solid;
  153. margin-bottom: 15px;
  154. margin-top: 20px;
  155. }
  156. ul {
  157. > li {
  158. list-style: none;
  159. > a {
  160. color: $color-black;
  161. display: block;
  162. padding: 5px 0;
  163. }
  164. }
  165. }
  166. }
  167. }
  168. }
  169. label.checkbox {
  170. display: flex;
  171. align-items: center;
  172. margin-bottom: 20px;
  173. > input[type="checkbox"] {
  174. display: none;
  175. + .checked {
  176. position: relative;
  177. width: 20px;
  178. height: 20px;
  179. border: 1px solid $color-primary-2;
  180. border-radius: 3px;
  181. &::before {
  182. content: "";
  183. position: absolute;
  184. left: 1px;
  185. top: 1px;
  186. right: 1px;
  187. bottom: 1px;
  188. border-radius: 3px;
  189. background-color: $color-white;
  190. }
  191. }
  192. &:hover {
  193. + .checked {
  194. box-shadow: 0 0 1px 1px $color-primary-3;
  195. &::before {
  196. background-color: $color-primary-3;
  197. }
  198. }
  199. &:checked {
  200. + .checked {
  201. &::before {
  202. background-color: $color-primary-1;
  203. // filter: brightness(1.2);
  204. }
  205. }
  206. }
  207. }
  208. &:checked {
  209. + .checked {
  210. &::before {
  211. background-color: $color-primary-2;
  212. }
  213. }
  214. }
  215. }
  216. > .text {
  217. margin-left: 10px;
  218. user-select: none;
  219. }
  220. &:hover {
  221. cursor: pointer;
  222. }
  223. }
  224. // TREE
  225. .tree {
  226. border: 1px solid $color-primary-2;
  227. padding-left: 20px;
  228. margin-bottom: 20px;
  229. font-size: 0.9rem;
  230. max-height: 250px;
  231. overflow: auto;
  232. outline: none;
  233. .branch {
  234. margin-left: 40px;
  235. position: relative;
  236. > .head {
  237. position: relative;
  238. &:hover {
  239. color: $color-primary-2;
  240. cursor: pointer;
  241. }
  242. &::before {
  243. content: "";
  244. position: absolute;
  245. left: -17px;
  246. width: 0.75rem;
  247. height: 0.75rem;
  248. border: 1px solid;
  249. border-color: $color-primary-0;
  250. border-radius: 50%;
  251. display: flex;
  252. justify-content: center;
  253. align-items: center;
  254. top: 0.6rem;
  255. transform: translateY(-50%);
  256. }
  257. }
  258. > .body {
  259. height: auto;
  260. }
  261. &.selected {
  262. > .head {
  263. &::before {
  264. background-color: $color-primary-3;
  265. }
  266. }
  267. }
  268. &::before {
  269. content: "";
  270. position: absolute;
  271. border-top: 1px dashed;
  272. border-color: $color-primary-2;
  273. top: 0.6rem;
  274. left: -40px;
  275. width: 20px;
  276. }
  277. &::after {
  278. content: "";
  279. position: absolute;
  280. border-left: 1px dashed;
  281. border-color: $color-primary-2;
  282. top: 0;
  283. bottom: 0;
  284. left: -40px;
  285. }
  286. }
  287. }