_nestable.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. // NESTABLE
  2. // -----------------------------------------------------------------------------
  3. .dd {
  4. position: relative;
  5. display: block;
  6. margin: 0;
  7. padding: 0;
  8. list-style: none;
  9. font-size: 13px;
  10. line-height: 20px;
  11. }
  12. .dd-list {
  13. display: block;
  14. position: relative;
  15. margin: 0;
  16. padding: 0;
  17. list-style: none;
  18. .dd-list {
  19. padding-left: 30px;
  20. }
  21. }
  22. .dd-collapsed .dd-list {
  23. display: none;
  24. }
  25. .dd-item, .dd-empty, .dd-placeholder {
  26. display: block;
  27. position: relative;
  28. margin: 0;
  29. padding: 0;
  30. min-height: 20px;
  31. font-size: 13px;
  32. line-height: 20px;
  33. }
  34. .dd-handle {
  35. display: block;
  36. height: 34px;
  37. margin: 5px 0;
  38. padding: 6px 10px;
  39. color: #333;
  40. text-decoration: none;
  41. font-weight: $font-weight-semibold;
  42. border: 1px solid #CCC;
  43. background: #F6F6F6;
  44. -webkit-border-radius: 3px;
  45. border-radius: 3px;
  46. box-sizing: border-box;
  47. -moz-box-sizing: border-box;
  48. &:hover {
  49. color: $color-primary;
  50. background: #fff;
  51. }
  52. }
  53. .dd-item > button {
  54. display: block;
  55. position: relative;
  56. cursor: pointer;
  57. float: left;
  58. width: 25px;
  59. height: 20px;
  60. margin: 7px 0;
  61. padding: 0;
  62. text-indent: 100%;
  63. white-space: nowrap;
  64. overflow: hidden;
  65. border: 0;
  66. background: transparent;
  67. font-size: 12px;
  68. line-height: 1;
  69. text-align: center;
  70. font-weight: bold;
  71. &:before {
  72. content: '+';
  73. display: block;
  74. position: absolute;
  75. width: 100%;
  76. text-align: center;
  77. text-indent: 0;
  78. }
  79. &[data-action="collapse"]:before {
  80. content: '-';
  81. }
  82. }
  83. .dd-placeholder {
  84. margin: 5px 0;
  85. padding: 0;
  86. min-height: 30px;
  87. background: lighten($color-primary, 55%);
  88. border: 1px dashed $color-primary;
  89. box-sizing: border-box;
  90. -moz-box-sizing: border-box;
  91. }
  92. .dd-empty {
  93. margin: 5px 0;
  94. padding: 0;
  95. min-height: 30px;
  96. background: #f2fbff;
  97. border: 1px dashed #b6bcbf;
  98. box-sizing: border-box;
  99. -moz-box-sizing: border-box;
  100. border: 1px dashed #bbb;
  101. min-height: 100px;
  102. background-color: #e5e5e5;
  103. background-image: -webkit-linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white), -webkit-linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white);
  104. background-image: -moz-linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white), -moz-linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white);
  105. background-image: linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white), linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white);
  106. background-size: 60px 60px;
  107. background-position: 0 0, 30px 30px;
  108. }
  109. .dd-dragel {
  110. position: absolute;
  111. pointer-events: none;
  112. z-index: 9999;
  113. > .dd-item .dd-handle {
  114. margin-top: 0;
  115. }
  116. .dd-handle {
  117. -webkit-box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, 0.1);
  118. box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, 0.1);
  119. }
  120. }
  121. // DARK
  122. // -----------------------------------------------------------------------------
  123. /* dark */
  124. html.dark {
  125. .dd-handle {
  126. background: $dark-color-3;
  127. border-color: $dark-color-2;
  128. color: $dark-default-text;
  129. &:hover {
  130. background: $dark-color-2;
  131. }
  132. }
  133. }