_swipeable.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. .leading-actions {
  2. display: flex;
  3. }
  4. .leading-actions > * {
  5. width: 0;
  6. overflow-x: hidden;
  7. }
  8. .swipeable-list {
  9. flex: 1;
  10. width: 100%;
  11. height: 100%;
  12. overflow-y: auto;
  13. -webkit-overflow-scrolling: touch;
  14. }
  15. .swipeable-list-item {
  16. position: relative;
  17. transition: max-height 0.5s ease-in-out;
  18. max-height: 1000px;
  19. transform-origin: top;
  20. overflow: hidden;
  21. width: 100%;
  22. }
  23. .swipeable-list-item--remove {
  24. max-height: 0;
  25. transition: max-height 0.35s ease-out;
  26. }
  27. .swipeable-list-item__content {
  28. width: 100%;
  29. align-items: center;
  30. box-sizing: border-box;
  31. height: 100%;
  32. display: flex;
  33. }
  34. .swipeable-list-item__content--return {
  35. //transition: transform 0.5s ease-in-out;
  36. transition: transform 0.3s ease-in-out;
  37. }
  38. @keyframes content-return-leading-ms {
  39. 20% {
  40. transform: translateX(100%);
  41. }
  42. 100% {
  43. transform: translateX(0);
  44. }
  45. }
  46. .swipeable-list-item__content--return-leading-ms {
  47. animation-duration: 0.5s;
  48. animation-name: content-return-leading-ms;
  49. animation-timing-function: linear;
  50. }
  51. @keyframes content-return-trailing-ms {
  52. 20% {
  53. transform: translateX(-100%);
  54. }
  55. 100% {
  56. transform: translateX(0);
  57. }
  58. }
  59. .swipeable-list-item__content--return-trailing-ms {
  60. animation-duration: 0.5s;
  61. animation-name: content-return-trailing-ms;
  62. animation-timing-function: linear;
  63. }
  64. .swipeable-list-item__content--remove {
  65. transition: transform 0.5s ease-in-out;
  66. }
  67. .swipeable-list-item__leading-actions {
  68. position: absolute;
  69. display: flex;
  70. width: 0px;
  71. overflow: hidden;
  72. height: 100%;
  73. }
  74. .swipeable-list-item__leading-actions--return {
  75. transition: width 0.5s ease-in-out;
  76. }
  77. @keyframes actions-return-ms {
  78. 20% {
  79. width: 100%;
  80. }
  81. 100% {
  82. width: 0;
  83. }
  84. }
  85. .swipeable-list-item__actions--return-ms {
  86. animation-duration: 0.5s;
  87. animation-name: actions-return-ms;
  88. animation-timing-function: linear;
  89. }
  90. .swipeable-list-item__leading-actions > * {
  91. overflow: hidden;
  92. display: flex;
  93. justify-content: flex-end;
  94. transform: scale(1);
  95. transform-origin: center left;
  96. transition: transform 0.2s ease-out;
  97. }
  98. .swipeable-list-item__trailing-actions {
  99. display: flex;
  100. width: 0px;
  101. position: absolute;
  102. right: 0;
  103. top: 0;
  104. justify-content: flex-end;
  105. overflow: hidden;
  106. height: 100%;
  107. }
  108. .swipeable-list-item__trailing-actions--return {
  109. //transition: width 0.5s ease-in-out;
  110. transition: width 0.3s ease-in-out;
  111. }
  112. .swipeable-list-item__trailing-actions > * {
  113. overflow: hidden;
  114. transform: scale(1);
  115. transform-origin: center right;
  116. transition: transform 0.2s ease-out;
  117. }
  118. .swipeable-list-item__leading-actions--scaled > * {
  119. transform: scale(1.2);
  120. transform-origin: center left;
  121. transition: transform 0.2s ease-in;
  122. }
  123. .swipeable-list-item__trailing-actions--scaled > * {
  124. transform: scale(1.2);
  125. transform-origin: center right;
  126. transition: transform 0.2s ease-in;
  127. }
  128. .swipe-action {
  129. display: flex;
  130. width: 100%;
  131. align-items: stretch;
  132. }
  133. .swipe-action > * {
  134. flex: 1;
  135. }
  136. .swipe-action__grayed > * {
  137. background-color: gray !important;
  138. }
  139. .swipe-action__leading > * {
  140. justify-content: flex-start;
  141. }
  142. .swipe-action__trailing > * {
  143. justify-content: flex-end;
  144. }
  145. .swipe-action__leading--full-swipe-rest,
  146. .swipe-action__trailing--full-swipe-rest {
  147. width: 0;
  148. transition: width 0.2s;
  149. }
  150. .swipe-action__leading--full-swipe-main > * {
  151. justify-content: flex-end;
  152. }
  153. .swipe-action__trailing--full-swipe-main > * {
  154. justify-content: flex-start;
  155. }
  156. .trailing-actions {
  157. display: flex;
  158. }
  159. .trailing-actions > * {
  160. width: 0;
  161. overflow-x: hidden;
  162. }