base.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. *,
  2. *:before,
  3. *:after {
  4. box-sizing: border-box;
  5. }
  6. body {
  7. margin: 0;
  8. height: 100vh;
  9. }
  10. #app {
  11. width: 100vw;
  12. height: 100vh;
  13. }
  14. .wrapper {
  15. width: 100%;
  16. height: 100%;
  17. }
  18. .relative {
  19. position: relative;
  20. }
  21. .absolute {
  22. position: absolute;
  23. }
  24. .sticky {
  25. position: sticky;
  26. }
  27. .grid,
  28. .flex {
  29. &.center {
  30. justify-content: center;
  31. align-items: center;
  32. }
  33. > .fit-size {
  34. min: {
  35. width: 0;
  36. height: 0;
  37. }
  38. }
  39. > .fit-width {
  40. min-width: 0;
  41. }
  42. > .fit-height {
  43. min-height: 0;
  44. }
  45. }
  46. .flex {
  47. display: flex;
  48. &.column {
  49. flex-direction: column;
  50. &.align-left {
  51. align-items: flex-start;
  52. }
  53. &.align-center {
  54. align-items: center;
  55. }
  56. &.align-right {
  57. align-items: flex-end;
  58. }
  59. &.valign-top {
  60. justify-content: flex-start;
  61. }
  62. &.valign-center {
  63. justify-content: center;
  64. }
  65. &.valign-bottom {
  66. justify-content: flex-end;
  67. }
  68. }
  69. &:not(.column) {
  70. &.align-left {
  71. justify-content: flex-start;
  72. }
  73. &.align-center {
  74. justify-content: center;
  75. }
  76. &.align-right {
  77. justify-content: flex-end;
  78. }
  79. &.valign-top {
  80. align-items: flex-start;
  81. }
  82. &.valign-center {
  83. align-items: center;
  84. }
  85. &.valign-bottom {
  86. align-items: flex-end;
  87. }
  88. }
  89. &.flex-wrap {
  90. flex-wrap: wrap;
  91. }
  92. }
  93. .flex-1 {
  94. flex: 1;
  95. }
  96. .flex-auto {
  97. flex: 0 0 auto;
  98. }
  99. .grid {
  100. display: grid;
  101. &.label-input {
  102. grid-template-columns: repeat(var(--columns-repeat), max-content auto);
  103. }
  104. }
  105. .nowrap {
  106. white-space: nowrap;
  107. }
  108. .gap-1em {
  109. > * + * {
  110. margin-left: 1em;
  111. }
  112. }
  113. .font-size-12 {
  114. font-size: 12px;
  115. }
  116. .font-size-14 {
  117. font-size: 14px;
  118. }
  119. .number {
  120. text-align: right;
  121. }
  122. .text {
  123. text-align: left;
  124. }
  125. .text-right {
  126. text-align: right;
  127. }
  128. ul {
  129. list-style: none;
  130. }
  131. i {
  132. font-style: normal;
  133. }
  134. label {
  135. cursor: inherit;
  136. }
  137. input {
  138. &::-webkit-outer-spin-button,
  139. &::-webkit-inner-spin-button {
  140. -webkit-appearance: none;
  141. }
  142. &[type="number"] {
  143. -moz-appearance: textfield;
  144. }
  145. }
  146. .overflow-auto {
  147. overflow: auto;
  148. }
  149. .overflow-hidden {
  150. overflow: hidden;
  151. }
  152. .text-ellipsis {
  153. white-space: nowrap;
  154. overflow: hidden;
  155. text-overflow: ellipsis;
  156. }
  157. .text-center {
  158. text-align: center;
  159. }
  160. .origin-table {
  161. --border-color: #999999;
  162. width: 100%;
  163. > :first-child,
  164. colgroup + * {
  165. > tr:first-child {
  166. th,
  167. td {
  168. border-top: 1px solid var(--border-color);
  169. }
  170. }
  171. }
  172. th,
  173. td {
  174. border: {
  175. right: 1px solid var(--border-color);
  176. bottom: 1px solid var(--border-color);
  177. }
  178. &:first-child {
  179. border: {
  180. left: 1px solid var(--border-color);
  181. }
  182. }
  183. }
  184. .cell {
  185. min-height: 40px;
  186. padding: 8px 10px;
  187. }
  188. tr {
  189. &:not(:first-child) {
  190. td {
  191. border-top: 0;
  192. }
  193. }
  194. }
  195. }
  196. ::-webkit-scrollbar {
  197. width: 8px;
  198. height: 8px;
  199. }