sideSheet.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. @import './variables.scss';
  2. @import './animation.scss';
  3. $module: #{$prefix}-sidesheet;
  4. .#{$module} {
  5. @include font-size-regular;
  6. position: fixed;
  7. margin: $spacing-sideSheet-margin;
  8. top: 0;
  9. left: 0;
  10. height: 100%;
  11. &-inner:focus,
  12. &-content:focus {
  13. outline: none;
  14. }
  15. &-inner-wrap {
  16. position: absolute;
  17. }
  18. &-left,
  19. &-right {
  20. top: 0;
  21. width: 0%;
  22. height: 100%;
  23. .#{$module}-inner-wrap {
  24. height: 100%;
  25. }
  26. &.#{$module} {
  27. width: 100%;
  28. }
  29. }
  30. &-right {
  31. right: 0;
  32. .#{$module}-inner-wrap {
  33. right: 0;
  34. }
  35. }
  36. &-top,
  37. &-bottom {
  38. left: 0;
  39. width: 100%;
  40. height: 0%;
  41. .#{$module}-inner-wrap {
  42. width: 100%;
  43. }
  44. &.#{$module} {
  45. height: 100%;
  46. }
  47. }
  48. &-top {
  49. top: 0;
  50. }
  51. &-bottom {
  52. bottom: 0;
  53. .#{$module}-inner-wrap {
  54. bottom: 0;
  55. }
  56. }
  57. &-title {
  58. flex: 1 0 auto;
  59. margin: $spacing-sideSheet_title-margin;
  60. @include font-size-header-5;
  61. font-weight: $font-sideSheet_title-fontWeight;
  62. color: $color-sideSheet_main-text;
  63. text-align: left;
  64. }
  65. &-inner {
  66. // position: relative;
  67. z-index: 1;
  68. overflow: auto;
  69. background-color: $color-sideSheet-bg;
  70. // background-clip: padding-box;
  71. border: 0;
  72. transition: $transition_duration-sideSheet_inner $transition_function-sideSheet_inner
  73. $transition_delay-sideSheet_inner;
  74. }
  75. &-header {
  76. display: flex;
  77. align-items: flex-start;
  78. padding: $spacing-sideSheet_header-padding;
  79. padding-bottom: $spacing-sideSheet_header-paddingBottom;
  80. }
  81. &-body {
  82. padding: $spacing-sideSheet_body-paddingY $spacing-sideSheet_body-paddingX;
  83. flex: 1;
  84. }
  85. &-content {
  86. height: 100%;
  87. display: flex;
  88. flex-direction: column;
  89. box-sizing: border-box;
  90. overflow: hidden;
  91. // padding: 0 $spacing-loose;
  92. }
  93. &-mask {
  94. position: absolute;
  95. top: 0;
  96. left: 0;
  97. width: 100%;
  98. height: 100%;
  99. background-color: $color-sideSheet_mask-bg;
  100. opacity: 1;
  101. transition: opacity $transition_duration-sideSheet_mask-bg $transition_function-sideSheet_mask-bg
  102. $transition_delay-sideSheet_mask-bg;
  103. &-hidden {
  104. opacity: 0;
  105. display: none;
  106. }
  107. }
  108. &-footer {
  109. padding: $spacing-sideSheet_footer-padding;
  110. }
  111. }
  112. .#{$module}-fixed {
  113. .#{$module}-inner {
  114. box-shadow: var(--semi-shadow-elevated);
  115. }
  116. &.#{$module}-left {
  117. left: 0;
  118. // width will inject by js
  119. .#{$module}-inner {
  120. left: 0;
  121. }
  122. }
  123. &.#{$module}-right {
  124. left: auto;
  125. // width will inject by js
  126. .#{$module}-inner {
  127. right: 0;
  128. }
  129. }
  130. &.#{$module}-top,
  131. &.#{$module}-bottom {
  132. height: auto;
  133. }
  134. &.#{$module}-bottom {
  135. top: auto;
  136. .#{$module}-inner {
  137. bottom: 0;
  138. }
  139. }
  140. }
  141. .#{$module}.#{$module}-popup {
  142. position: absolute;
  143. }
  144. .#{$module}-hidden {
  145. display: none;
  146. }
  147. @import './rtl.scss';