sortable.css 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. body {
  2. -webkit-font-smoothing: antialiased;
  3. -moz-osx-font-smoothing: grayscale;
  4. -webkit-tap-highlight-color: transparent;
  5. }
  6. * {
  7. box-sizing: border-box;
  8. }
  9. .title {
  10. font-weight: 500;
  11. text-align: center;
  12. margin-bottom: 20px;
  13. font-size: 20px;
  14. color: #0E254E;
  15. }
  16. .list {
  17. margin: 0 auto;
  18. width: 100%;
  19. max-width: 380px;
  20. user-select: none;
  21. }
  22. .list__item {
  23. transition: box-shadow 200ms ease-out, opacity 200ms ease-out;
  24. border-radius: 6px;
  25. background: #fff;
  26. box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  27. display: flex;
  28. }
  29. .list__item:not(:last-child) {
  30. margin-bottom: 7px;
  31. }
  32. .list__item.is-dragging {
  33. box-shadow: 0 0 24px rgba(0, 0, 0, 0.1);
  34. opacity: 0.8;
  35. }
  36. .list__item-content {
  37. width: calc(100% - 40px - 40px);
  38. padding: 10px 15px;
  39. }
  40. .list__item-title, .list__item-description {
  41. white-space: nowrap;
  42. text-overflow: ellipsis;
  43. overflow: hidden;
  44. }
  45. .list__item-title {
  46. font-size: 15px;
  47. color: #0E254E;
  48. }
  49. .list__item-description {
  50. font-size: 13px;
  51. color: #66748E;
  52. }
  53. .list__item-handle {
  54. position: relative;
  55. width: 40px;
  56. cursor: pointer;
  57. }
  58. .list__item-handle:before, .list__item-handle:after {
  59. content: "";
  60. position: absolute;
  61. left: 15px;
  62. right: 15px;
  63. top: 50%;
  64. height: 1px;
  65. background: #c2cada;
  66. }
  67. .list__item-handle:before {
  68. transform: translateY(-4px);
  69. }
  70. .list__item-handle:after {
  71. transform: translateY(4px);
  72. }
  73. .list__item-close {
  74. position: relative;
  75. width: 40px;
  76. cursor: pointer;
  77. }
  78. .list__item-close:after {
  79. content: "X";
  80. position: absolute;
  81. left: 15px;
  82. right: 15px;
  83. top: 30%;
  84. height: 0px;
  85. background: #c2cada;
  86. }
  87. .list__item-close:after {
  88. transform: translateY(0px);
  89. }
  90. .list__item-close:hover {
  91. background-color: #f44336;
  92. color: white;
  93. }
  94. .triangle{
  95. position: absolute;
  96. top: 1px;
  97. right: 5px;
  98. cursor: default;
  99. }
  100. .add-btn,
  101. .delete-btn,
  102. .modify_item-close,
  103. .group-button__confirm,
  104. .group-button__delete,
  105. .group-button__edit {
  106. position: absolute;
  107. top: 8px;
  108. right: 10px;
  109. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.99992 1.33325C4.31992 1.33325 1.33325 4.31992 1.33325 7.99992C1.33325 11.6799 4.31992 14.6666 7.99992 14.6666C11.6799 14.6666 14.6666 11.6799 14.6666 7.99992C14.6666 4.31992 11.6799 1.33325 7.99992 1.33325ZM7.33325 4.66658V7.33325H4.66658V8.66658H7.33325V11.3333H8.66658V8.66658H11.3333V7.33325H8.66658V4.66658H7.33325ZM2.66659 7.99992C2.66659 10.9399 5.05992 13.3333 7.99992 13.3333C10.9399 13.3333 13.3333 10.9399 13.3333 7.99992C13.3333 5.05992 10.9399 2.66659 7.99992 2.66659C5.05992 2.66659 2.66659 5.05992 2.66659 7.99992Z' fill='%23757575'/%3E%3C/svg%3E%0A");
  110. background-repeat: no-repeat;
  111. cursor: pointer;
  112. color: transparent;
  113. min-width: 16px;
  114. max-width: 16px;
  115. height: 16px;
  116. background-color: #ffffff;
  117. }
  118. .delete-btn,
  119. .modify_item-close,
  120. .group-button__delete {
  121. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.6666 4.27325L11.7266 3.33325L7.99992 7.05992L4.27325 3.33325L3.33325 4.27325L7.05992 7.99992L3.33325 11.7266L4.27325 12.6666L7.99992 8.93992L11.7266 12.6666L12.6666 11.7266L8.93992 7.99992L12.6666 4.27325Z' fill='%23757575'/%3E%3C/svg%3E%0A");
  122. right: 30px;
  123. }
  124. .group-button__confirm {
  125. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8Zm6 1 4-4 1 1-5 5-3-2 1-1 2 1Z' fill='%230D63B3'/%3E%3C/svg%3E");
  126. }
  127. .group-button__edit {
  128. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m12.246 2.193 1.56 1.56c.26.26.26.68 0 .94l-1.22 1.22-2.5-2.5 1.22-1.22A.656.656 0 0 1 11.772 2c.174 0 .34.06.474.193ZM1.999 11.5V14h2.5l7.373-7.373-2.5-2.5L2 11.5Zm1.947 1.167h-.614v-.614l6.04-6.04.614.614-6.04 6.04Z' fill='%23757575'/%3E%3C/svg%3E");
  129. }