_action-sheet.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /**
  2. * Action Sheets
  3. * --------------------------------------------------
  4. */
  5. .action-sheet-backdrop {
  6. @include transition(background-color 150ms ease-in-out);
  7. position: fixed;
  8. top: 0;
  9. left: 0;
  10. z-index: $z-index-action-sheet;
  11. width: 100%;
  12. height: 100%;
  13. background-color: rgba(0,0,0,0);
  14. &.active {
  15. background-color: rgba(0,0,0,0.4);
  16. }
  17. }
  18. .action-sheet-wrapper {
  19. @include translate3d(0, 100%, 0);
  20. @include transition(all cubic-bezier(.36, .66, .04, 1) 500ms);
  21. position: absolute;
  22. bottom: 0;
  23. left: 0;
  24. right: 0;
  25. width: 100%;
  26. max-width: 500px;
  27. margin: auto;
  28. }
  29. .action-sheet-up {
  30. @include translate3d(0, 0, 0);
  31. }
  32. .action-sheet {
  33. margin-left: $sheet-margin;
  34. margin-right: $sheet-margin;
  35. width: auto;
  36. z-index: $z-index-action-sheet;
  37. overflow: hidden;
  38. .button {
  39. display: block;
  40. padding: 1px;
  41. width: 100%;
  42. border-radius: 0;
  43. border-color: $sheet-options-border-color;
  44. background-color: transparent;
  45. color: $sheet-options-text-color;
  46. font-size: 21px;
  47. &:hover {
  48. color: $sheet-options-text-color;
  49. }
  50. &.destructive {
  51. color: #ff3b30;
  52. &:hover {
  53. color: #ff3b30;
  54. }
  55. }
  56. }
  57. .button.active, .button.activated {
  58. box-shadow: none;
  59. border-color: $sheet-options-border-color;
  60. color: $sheet-options-text-color;
  61. background: $sheet-options-bg-active-color;
  62. }
  63. }
  64. .action-sheet-has-icons .icon {
  65. position: absolute;
  66. left: 16px;
  67. }
  68. .action-sheet-title {
  69. padding: $sheet-margin * 2;
  70. color: #8f8f8f;
  71. text-align: center;
  72. font-size: 13px;
  73. }
  74. .action-sheet-group {
  75. margin-bottom: $sheet-margin;
  76. border-radius: $sheet-border-radius;
  77. background-color: #fff;
  78. overflow: hidden;
  79. .button {
  80. border-width: 1px 0px 0px 0px;
  81. }
  82. .button:first-child:last-child {
  83. border-width: 0;
  84. }
  85. }
  86. .action-sheet-options {
  87. background: $sheet-options-bg-color;
  88. }
  89. .action-sheet-cancel {
  90. .button {
  91. font-weight: 500;
  92. }
  93. }
  94. .action-sheet-open {
  95. pointer-events: none;
  96. &.modal-open .modal {
  97. pointer-events: none;
  98. }
  99. .action-sheet-backdrop {
  100. pointer-events: auto;
  101. }
  102. }
  103. .platform-android {
  104. .action-sheet-backdrop.active {
  105. background-color: rgba(0,0,0,0.2);
  106. }
  107. .action-sheet {
  108. margin: 0;
  109. .action-sheet-title,
  110. .button {
  111. text-align: left;
  112. border-color: transparent;
  113. font-size: 16px;
  114. color: inherit;
  115. }
  116. .action-sheet-title {
  117. font-size: 14px;
  118. padding: 16px;
  119. color: #666;
  120. }
  121. .button.active,
  122. .button.activated {
  123. background: #e8e8e8;
  124. }
  125. }
  126. .action-sheet-group {
  127. margin: 0;
  128. border-radius: 0;
  129. background-color: #fafafa;
  130. }
  131. .action-sheet-cancel {
  132. display: none;
  133. }
  134. .action-sheet-has-icons {
  135. .button {
  136. padding-left: 56px;
  137. }
  138. }
  139. }