_resizable-block.less 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. // /**
  2. // * Copyright © Magento, Inc. All rights reserved.
  3. // * See COPYING.txt for license details.
  4. // */
  5. //
  6. // Components -> Resizable Block
  7. // _____________________________________________
  8. //
  9. // Variables
  10. // ---------------------------------------------
  11. @resizable-block-angle-handle__default__height: 12px;
  12. @resizable-block-angle-handle__default__width: 12px;
  13. @resizable-block-side-handle__default__size: 7px;
  14. @resizable-block-side-handle__custom__background-color: @color-gray89;
  15. @resizable-block-side-handle__custom__border-color: @color-gray-light2;
  16. @resizable-block-side-handle__custom__color: @color-gray40;
  17. @resizable-block-side-handle__custom__font-size: 1.6rem;
  18. //
  19. // Extends
  20. // _____________________________________________
  21. .abs-block-resizable {
  22. height: 15rem;
  23. min-height: 15rem;
  24. }
  25. // Resizable Block Content
  26. .abs-block-resizable-content {
  27. height: 100%;
  28. margin-bottom: @indent__base;
  29. min-height: 15rem;
  30. overflow: auto;
  31. position: relative;
  32. z-index: 1;
  33. }
  34. // Bottom handle
  35. .abs-block-resizable-handle-bottom {
  36. background: @resizable-block-side-handle__custom__background-color;
  37. border: 1px solid @resizable-block-side-handle__custom__border-color;
  38. bottom: auto;
  39. color: @resizable-block-side-handle__custom__color;
  40. font-size: @resizable-block-side-handle__custom__font-size;
  41. font-weight: @font-weight__bold;
  42. height: auto;
  43. left: -1px;
  44. letter-spacing: .1rem;
  45. line-height: @resizable-block-side-handle__custom__font-size;
  46. padding-bottom: .3rem;
  47. right: -1px;
  48. text-align: center;
  49. top: 100%;
  50. width: auto;
  51. &:before {
  52. content: ':::::';
  53. }
  54. }
  55. //
  56. // Default Resizable Styles
  57. // ---------------------------------------------
  58. .ui-resizable {
  59. position: relative;
  60. }
  61. .ui-resizable-handle {
  62. display: block;
  63. font-size: .1px;
  64. position: absolute;
  65. touch-action: none;
  66. }
  67. .ui-resizable-n {
  68. cursor: n-resize;
  69. height: @resizable-block-side-handle__default__size;
  70. left: 0;
  71. top: -@resizable-block-side-handle__default__size/2;
  72. width: 100%;
  73. }
  74. .ui-resizable-s {
  75. bottom: -@resizable-block-side-handle__default__size/2;
  76. cursor: s-resize;
  77. height: @resizable-block-side-handle__default__size;
  78. left: 0;
  79. width: 100%;
  80. }
  81. .ui-resizable-e {
  82. cursor: e-resize;
  83. height: 100%;
  84. right: -@resizable-block-side-handle__default__size/2;
  85. top: 0;
  86. width: @resizable-block-side-handle__default__size;
  87. }
  88. .ui-resizable-w {
  89. cursor: w-resize;
  90. height: 100%;
  91. left: -@resizable-block-side-handle__default__size/2;
  92. top: 0;
  93. width: @resizable-block-side-handle__default__size;
  94. }
  95. .ui-resizable-se {
  96. bottom: -@resizable-block-angle-handle__default__height/2;
  97. cursor: se-resize;
  98. height: @resizable-block-angle-handle__default__height;
  99. right: -@resizable-block-angle-handle__default__width/2;
  100. width: @resizable-block-angle-handle__default__width;
  101. }
  102. .ui-resizable-sw {
  103. bottom: -@resizable-block-angle-handle__default__height/2;
  104. cursor: sw-resize;
  105. height: @resizable-block-angle-handle__default__height;
  106. left: -@resizable-block-angle-handle__default__width/2;
  107. width: @resizable-block-angle-handle__default__width;
  108. }
  109. .ui-resizable-nw {
  110. cursor: nw-resize;
  111. height: @resizable-block-angle-handle__default__height;
  112. left: -@resizable-block-angle-handle__default__width/2;
  113. top: -@resizable-block-angle-handle__default__height/2;
  114. width: @resizable-block-angle-handle__default__width;
  115. }
  116. .ui-resizable-ne {
  117. cursor: ne-resize;
  118. height: @resizable-block-angle-handle__default__height;
  119. right: -@resizable-block-angle-handle__default__width/2;
  120. top: -@resizable-block-angle-handle__default__height/2;
  121. width: @resizable-block-angle-handle__default__width;
  122. }
  123. //
  124. // Container
  125. // ---------------------------------------------
  126. .block-resizable {
  127. &:extend(.abs-block-resizable all);
  128. .block-content {
  129. &:extend(.abs-block-resizable-content all);
  130. }
  131. .ui-resizable-s {
  132. &:extend(.abs-block-resizable-handle-bottom all);
  133. }
  134. }