drawer.less 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. @import '../../style/themes/index';
  2. @drawer-prefix-cls: ~'@{ant-prefix}-drawer';
  3. @picker-prefix-cls: ~'@{ant-prefix}-picker';
  4. @drawer-animation-ease: @ease-out-quint;
  5. .@{drawer-prefix-cls} {
  6. position: fixed;
  7. top: 0;
  8. right: 0;
  9. bottom: 0;
  10. left: 0;
  11. z-index: @zindex-modal;
  12. pointer-events: none;
  13. &-inline {
  14. position: absolute;
  15. }
  16. // ====================== Mask ======================
  17. &-mask {
  18. position: absolute;
  19. top: 0;
  20. right: 0;
  21. bottom: 0;
  22. left: 0;
  23. z-index: @zindex-modal;
  24. background: @modal-mask-bg;
  25. pointer-events: auto;
  26. }
  27. // ==================== Content =====================
  28. &-content-wrapper {
  29. position: absolute;
  30. z-index: @zindex-modal;
  31. transition: all @animation-duration-slow;
  32. &-hidden {
  33. display: none;
  34. }
  35. // Placement
  36. .@{drawer-prefix-cls}-left > & {
  37. top: 0;
  38. bottom: 0;
  39. left: 0;
  40. box-shadow: @shadow-1-right;
  41. }
  42. .@{drawer-prefix-cls}-right > & {
  43. top: 0;
  44. right: 0;
  45. bottom: 0;
  46. box-shadow: @shadow-1-left;
  47. }
  48. .@{drawer-prefix-cls}-top > & {
  49. top: 0;
  50. right: 0;
  51. left: 0;
  52. box-shadow: @shadow-1-down;
  53. }
  54. .@{drawer-prefix-cls}-bottom > & {
  55. right: 0;
  56. bottom: 0;
  57. left: 0;
  58. box-shadow: @shadow-1-up;
  59. }
  60. }
  61. &-content {
  62. width: 100%;
  63. height: 100%;
  64. overflow: auto;
  65. background: @drawer-bg;
  66. pointer-events: auto;
  67. }
  68. // ===================== Panel ======================
  69. &-wrapper-body {
  70. display: flex;
  71. flex-direction: column;
  72. width: 100%;
  73. height: 100%;
  74. }
  75. // Header
  76. &-header {
  77. display: flex;
  78. flex: 0;
  79. align-items: center;
  80. padding: @drawer-header-padding;
  81. font-size: @drawer-title-font-size;
  82. line-height: @drawer-title-line-height;
  83. border-bottom: @border-width-base @border-style-base @border-color-split;
  84. &-title {
  85. display: flex;
  86. flex: 1;
  87. align-items: center;
  88. min-width: 0;
  89. min-height: 0;
  90. }
  91. }
  92. &-extra {
  93. flex: none;
  94. }
  95. &-close {
  96. display: inline-block;
  97. margin-right: 12px;
  98. color: @modal-close-color;
  99. font-weight: 700;
  100. font-size: @font-size-lg;
  101. font-style: normal;
  102. line-height: 1;
  103. text-align: center;
  104. text-transform: none;
  105. text-decoration: none;
  106. background: transparent;
  107. border: 0;
  108. outline: 0;
  109. cursor: pointer;
  110. transition: color @animation-duration-slow;
  111. text-rendering: auto;
  112. &:focus,
  113. &:hover {
  114. color: @icon-color-hover;
  115. text-decoration: none;
  116. }
  117. }
  118. &-title {
  119. flex: 1;
  120. margin: 0;
  121. color: @heading-color;
  122. font-weight: 500;
  123. font-size: @drawer-title-font-size;
  124. line-height: @drawer-title-line-height;
  125. }
  126. // Body
  127. &-body {
  128. flex: 1;
  129. min-width: 0;
  130. min-height: 0;
  131. padding: @drawer-body-padding;
  132. overflow: auto;
  133. }
  134. // Footer
  135. &-footer {
  136. flex-shrink: 0;
  137. padding: @drawer-footer-padding-vertical @drawer-footer-padding-horizontal;
  138. border-top: @border-width-base @border-style-base @border-color-split;
  139. }
  140. }