index.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. @import "../common/abstracts/variable";
  2. @import "../common/abstracts/mixin";
  3. .wot-theme-dark {
  4. @include b(grid-item) {
  5. @include when(border) {
  6. &::before {
  7. background-color: $-dark-border-color;
  8. }
  9. &::after {
  10. background-color: $-dark-border-color;
  11. }
  12. }
  13. // 第一行元素
  14. @include when(first) {
  15. &::after {
  16. background-color: $-dark-border-color;
  17. }
  18. }
  19. @include e(content) {
  20. background-color: $-dark-background2;
  21. @include m(hover) {
  22. background-color: $-grid-item-hover-bg-dark !important;
  23. }
  24. }
  25. }
  26. }
  27. @include b(grid-item) {
  28. height: 100%;
  29. font-size: $-grid-item-fs;
  30. box-sizing: border-box;
  31. position: relative;
  32. float: left;
  33. display: flex;
  34. flex-direction: column;
  35. justify-content: center;
  36. text-align: center;
  37. overflow: hidden;
  38. @include when(border) {
  39. &::before {
  40. content: "";
  41. position: absolute;
  42. width: 100%;
  43. height: 1px;
  44. transform: scaleY(0.5);
  45. background-color: $-grid-item-border-color;
  46. top: 0;
  47. left: 0;
  48. z-index: 1;
  49. }
  50. &::after {
  51. content: "";
  52. position: absolute;
  53. width: 1px;
  54. transform: scaleX(0.5);
  55. height: 100%;
  56. background-color: $-grid-item-border-color;
  57. bottom: 0;
  58. right: 0;
  59. }
  60. }
  61. // 第一行元素
  62. @include when(first) {
  63. &::after {
  64. content: "";
  65. position: absolute;
  66. width: 1px;
  67. transform: scaleX(0.5);
  68. height: 100%;
  69. background-color: $-grid-item-border-color;
  70. bottom: 0;
  71. right: 0;
  72. }
  73. }
  74. // 每行右侧的元素
  75. @include when(right) {
  76. &::after {
  77. display: none;
  78. }
  79. }
  80. @include when(last) {
  81. &::after {
  82. display: none;
  83. }
  84. }
  85. @include e(wrapper) {
  86. display: inline-block;
  87. margin: 0 auto;
  88. }
  89. @include e(content) {
  90. height: 100%;
  91. padding: $-grid-item-padding;
  92. background-color: $-grid-item-bg;
  93. position: relative;
  94. display: flex;
  95. flex-direction: column;
  96. justify-content: center;
  97. @include when(square) {
  98. box-sizing: border-box;
  99. position: absolute;
  100. top: 0;
  101. right: 0;
  102. left: 0;
  103. padding: 0;
  104. height: 100%;
  105. }
  106. @include when(round) {
  107. &::after {
  108. content: " ";
  109. position: absolute;
  110. top: 0;
  111. left: 0;
  112. width: 200%;
  113. height: 200%;
  114. border: 1px solid $-grid-item-border-color;
  115. transform-origin: top left;
  116. transform: scale(0.5);
  117. box-sizing: border-box;
  118. }
  119. }
  120. @include m(hover) {
  121. background-color: $-grid-item-hover-bg !important;
  122. }
  123. }
  124. @include e(text) {
  125. margin-top: 8px;
  126. font-size: $-grid-item-fs;
  127. line-height: $-grid-item-fs;
  128. @include lineEllipsis;
  129. }
  130. }