Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

action-sheet.css 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. :root {
  2. --action-sheet-mask-color: rgba(0, 0, 0, 0.1);
  3. --material-action-sheet-mask-color: rgba(0, 0, 0, 0.2);
  4. }
  5. /*~
  6. name: Action Sheet
  7. category: Action Sheet
  8. markup: |
  9. <div class="action-sheet-mask"></div>
  10. <div class="action-sheet">
  11. <div class="action-sheet-title">Title</div>
  12. <button class="action-sheet-button">Label</button>
  13. <button class="action-sheet-button">Cancel</button>
  14. </div>
  15. */
  16. /*~
  17. name: Action Sheet with Delete Label
  18. category: Action Sheet
  19. markup: |
  20. <div class="action-sheet-mask"></div>
  21. <div class="action-sheet">
  22. <button class="action-sheet-button">Label</button>
  23. <button class="action-sheet-button action-sheet-button--destructive">Delete Label</button>
  24. <button class="action-sheet-button">Cancel</button>
  25. </div>
  26. */
  27. .action-sheet {
  28. @apply(--reset-font);
  29. cursor: default;
  30. position: absolute;
  31. left: 10px; /* iOS 9, 10, 11 */
  32. right: 10px; /* iOS 9, 10, 11 */
  33. bottom: 10px; /* iOS 9, 10, 11 */
  34. z-index: 2;
  35. }
  36. .action-sheet-button {
  37. box-sizing: border-box;
  38. height: 56px;
  39. font-size: 20px;
  40. text-align: center;
  41. color: var(--action-sheet-button-color);
  42. background-color: var(--action-sheet-button-background-color);
  43. border-radius: 0;
  44. line-height: 56px;
  45. border: none;
  46. appearance: none;
  47. display: block;
  48. width: 100%;
  49. @apply(--ellipsis);
  50. background-size: 100% 1px;
  51. background-repeat: no-repeat;
  52. background-position: bottom;
  53. background-image: linear-gradient(0deg, var(--action-sheet-button-separator-color), var(--action-sheet-button-separator-color) 100%);
  54. @media (--retina-query) {
  55. background-image: linear-gradient(0deg, var(--action-sheet-button-separator-color), var(--action-sheet-button-separator-color) 50%, transparent 50%);
  56. }
  57. }
  58. .action-sheet-button:first-child {
  59. border-top-left-radius: 12px;
  60. border-top-right-radius: 12px;
  61. }
  62. .action-sheet-button:active {
  63. background-color: var(--action-sheet-button-active-background-color);
  64. background-image: none;
  65. }
  66. .action-sheet-button:focus {
  67. outline: none;
  68. }
  69. .action-sheet-button:nth-last-of-type(2) {
  70. border-bottom-right-radius: 12px;
  71. border-bottom-left-radius: 12px;
  72. background-image: none;
  73. }
  74. .action-sheet-button:last-of-type {
  75. border-radius: 12px;
  76. margin: 8px 0 0 0; /* iOS 9, 10, 11 */
  77. background-color: var(--action-sheet-cancel-button-background-color);
  78. background-image: none;
  79. font-weight: 600;
  80. }
  81. .action-sheet-button:last-of-type:active {
  82. background-color: var(--action-sheet-button-active-background-color);
  83. }
  84. .action-sheet-button--destructive {
  85. color: var(--action-sheet-button-destructive-color);
  86. }
  87. .action-sheet-title {
  88. box-sizing: border-box;
  89. height: 56px;
  90. font-size: 13px;
  91. color: var(--action-sheet-title-color);
  92. text-align: center;
  93. background-color: var(--action-sheet-button-background-color);
  94. line-height: 56px;
  95. @apply(--ellipsis);
  96. background-size: 100% 1px;
  97. background-repeat: no-repeat;
  98. background-position: bottom;
  99. background-image: linear-gradient(0deg, var(--action-sheet-button-separator-color), var(--action-sheet-button-separator-color) 100%);
  100. @media (--retina-query) {
  101. background-image: linear-gradient(0deg, var(--action-sheet-button-separator-color), var(--action-sheet-button-separator-color) 50%, transparent 50%);
  102. }
  103. }
  104. .action-sheet-title:first-child {
  105. border-top-left-radius: 12px;
  106. border-top-right-radius: 12px;
  107. }
  108. .action-sheet-icon {
  109. display: none;
  110. }
  111. .action-sheet-mask {
  112. position: absolute;
  113. left: 0;
  114. top: 0;
  115. right: 0;
  116. bottom: 0;
  117. background-color: var(--action-sheet-mask-color);
  118. z-index: 1;
  119. }
  120. /*~
  121. name: Material Action Sheet
  122. category: Action Sheet
  123. markup: |
  124. <div class="action-sheet-mask action-sheet-mask--material"></div>
  125. <div class="action-sheet action-sheet--material">
  126. <button class="action-sheet-button action-sheet-button--material"><i class="ion-android-checkbox-blank action-sheet-icon--material"></i>Label</button>
  127. <button class="action-sheet-button action-sheet-button--material"><i class="ion-android-checkbox-blank action-sheet-icon--material"></i>Label</button>
  128. <button class="action-sheet-button action-sheet-button--material"><i class="ion-android-close action-sheet-icon--material"></i>Cancel</button>
  129. </div>
  130. */
  131. /*~
  132. name: Material Action Sheet with Title
  133. category: Action Sheet
  134. markup: |
  135. <div class="action-sheet-mask action-sheet-mask--material"></div>
  136. <div class="action-sheet action-sheet--material">
  137. <div class="action-sheet-title action-sheet-title--material">Title</div>
  138. <button class="action-sheet-button action-sheet-button--material"><i class="ion-android-checkbox-blank action-sheet-icon--material"></i>Label</button>
  139. <button class="action-sheet-button action-sheet-button--material"><i class="ion-android-close action-sheet-icon--material"></i>Cancel</button>
  140. </div>
  141. */
  142. .action-sheet--material {
  143. left: 0;
  144. right: 0;
  145. bottom: 0;
  146. @apply(--material-shadow-5);
  147. }
  148. .action-sheet-title--material {
  149. @apply(--material-font);
  150. border-radius: 0;
  151. background-image: none;
  152. text-align: left;
  153. height: 56px;
  154. line-height: 56px;
  155. font-size: 16px;
  156. padding: 0 0 0 16px;
  157. color: var(--material-action-sheet-text-color);
  158. background-color: white;
  159. font-weight: 400;
  160. }
  161. .action-sheet-title--material:first-child {
  162. border-radius: 0;
  163. }
  164. .action-sheet-button--material {
  165. @apply(--material-font);
  166. border-radius: 0;
  167. background-image: none;
  168. height: 52px;
  169. line-height: 52px;
  170. text-align: left;
  171. font-size: 16px;
  172. padding: 0 0 0 16px;
  173. color: var(--material-action-sheet-text-color);
  174. font-weight: 400;
  175. background-color: white;
  176. }
  177. .action-sheet-button--material:first-child {
  178. border-radius: 0;
  179. }
  180. .action-sheet-button--material:nth-last-of-type(2) {
  181. border-radius: 0;
  182. }
  183. .action-sheet-button--material:last-of-type {
  184. margin: 0;
  185. border-radius: 0;
  186. font-weight: 400;
  187. background-color: white;
  188. }
  189. .action-sheet-icon--material {
  190. display: inline-block;
  191. float: left;
  192. height: 52px;
  193. line-height: 52px;
  194. margin-right: 32px;
  195. font-size: 26px;
  196. width: 0.8em;
  197. text-align: center;
  198. }
  199. .action-sheet-mask--material {
  200. background-color: var(--material-action-sheet-mask-color);
  201. }