123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. @import "../../themes/ionic.globals.ios";
  2. // iOS Alerts
  3. // --------------------------------------------------
  4. /// @prop - Max width of the alert
  5. $alert-ios-max-width: 270px !default;
  6. /// @prop - Border radius of the alert
  7. $alert-ios-border-radius: 13px !default;
  8. /// @prop - Background color of the alert
  9. $alert-ios-background: #f8f8f8 !default;
  10. /// @prop - Box shadow of the alert
  11. $alert-ios-box-shadow: none !default;
  12. // deprecated
  13. $alert-ios-head-padding: null !default;
  14. /// @prop - Padding top of the alert head
  15. $alert-ios-head-padding-top: 12px !default;
  16. /// @prop - Padding end of the alert head
  17. $alert-ios-head-padding-end: 16px !default;
  18. /// @prop - Padding bottom of the alert head
  19. $alert-ios-head-padding-bottom: 7px !default;
  20. /// @prop - Padding start of the alert head
  21. $alert-ios-head-padding-start: $alert-ios-head-padding-end !default;
  22. /// @prop - Text align of the alert head
  23. $alert-ios-head-text-align: center !default;
  24. /// @prop - Margin top of the alert title
  25. $alert-ios-title-margin-top: 8px !default;
  26. /// @prop - Font size of the alert title
  27. $alert-ios-title-font-size: 17px !default;
  28. /// @prop - Font weight of the alert title
  29. $alert-ios-title-font-weight: 600 !default;
  30. /// @prop - Font size of the alert sub title
  31. $alert-ios-sub-title-font-size: 14px !default;
  32. /// @prop - Text color of the alert sub title
  33. $alert-ios-sub-title-text-color: #666 !default;
  34. // deprecated
  35. $alert-ios-message-padding: null !default;
  36. /// @prop - Padding top of the alert message
  37. $alert-ios-message-padding-top: 0 !default;
  38. /// @prop - Padding end of the alert message
  39. $alert-ios-message-padding-end: 16px !default;
  40. /// @prop - Padding bottom of the alert message
  41. $alert-ios-message-padding-bottom: 21px !default;
  42. /// @prop - Padding start of the alert message
  43. $alert-ios-message-padding-start: $alert-ios-message-padding-end !default;
  44. /// @prop - Font size of the alert message
  45. $alert-ios-message-font-size: 13px !default;
  46. /// @prop - Text align of the alert message
  47. $alert-ios-message-text-align: center !default;
  48. /// @prop - Text color of the alert message
  49. $alert-ios-message-text-color: inherit !default;
  50. // deprecated
  51. $alert-ios-message-padding-empty: null !default;
  52. /// @prop - Padding top of the alert empty message
  53. $alert-ios-message-empty-padding-top: 0 !default;
  54. /// @prop - Padding end of the alert empty message
  55. $alert-ios-message-empty-padding-end: 0 !default;
  56. /// @prop - Padding bottom of the alert empty message
  57. $alert-ios-message-empty-padding-bottom: 12px !default;
  58. /// @prop - Padding start of the alert empty message
  59. $alert-ios-message-empty-padding-start: 0 !default;
  60. /// @prop - Maximum height of the alert content
  61. $alert-ios-content-max-height: 240px !default;
  62. /// @prop - Margin top of the alert input
  63. $alert-ios-input-margin-top: 10px !default;
  64. // deprecated
  65. $alert-ios-input-padding: null !default;
  66. /// @prop - Padding top on the alert input
  67. $alert-ios-input-padding-top: 6px !default;
  68. /// @prop - Padding end on the alert input
  69. $alert-ios-input-padding-end: $alert-ios-input-padding-top !default;
  70. /// @prop - Padding bottom on the alert input
  71. $alert-ios-input-padding-bottom: $alert-ios-input-padding-top !default;
  72. /// @prop - Padding start on the alert input
  73. $alert-ios-input-padding-start: $alert-ios-input-padding-end !default;
  74. /// @prop - Border color of the alert input
  75. $alert-ios-input-border-color: #ccc !default;
  76. /// @prop - Border of the alert input
  77. $alert-ios-input-border: $hairlines-width solid $alert-ios-input-border-color !default;
  78. /// @prop - Border radius of the alert input
  79. $alert-ios-input-border-radius: 4px !default;
  80. /// @prop - Background color of the alert input
  81. $alert-ios-input-background-color: #fff !default;
  82. /// @prop - Flex wrap of the alert button group
  83. $alert-ios-button-group-flex-wrap: wrap !default;
  84. /// @prop - Flex of the alert button
  85. $alert-ios-button-flex: 1 1 auto !default;
  86. /// @prop - Margin of the alert button
  87. $alert-ios-button-margin: 0 !default;
  88. /// @prop - Min width of the alert button
  89. $alert-ios-button-min-width: 50% !default;
  90. /// @prop - Minimum height of the alert button
  91. $alert-ios-button-min-height: 44px !default;
  92. /// @prop - Font size of the alert button
  93. $alert-ios-button-font-size: 17px !default;
  94. /// @prop - Color of the text in the alert button
  95. $alert-ios-button-text-color: color($colors-ios, primary) !default;
  96. /// @prop - Background color of the alert button
  97. $alert-ios-button-background-color: transparent !default;
  98. /// @prop - Background color of the alert activated button
  99. $alert-ios-button-background-color-activated: #e9e9e9 !default;
  100. /// @prop - Border width of the alert button
  101. $alert-ios-button-border-width: $hairlines-width !default;
  102. /// @prop - Border style of the alert button
  103. $alert-ios-button-border-style: solid !default;
  104. /// @prop - Border color of the alert button
  105. $alert-ios-button-border-color: #dbdbdf !default;
  106. /// @prop - Border radius of the alert button
  107. $alert-ios-button-border-radius: 0 !default;
  108. /// @prop - Font weight of the main text on the alert button
  109. $alert-ios-button-main-font-weight: bold !default;
  110. /// @prop - Border top of the alert list
  111. $alert-ios-list-border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color !default;
  112. // deprecated
  113. $alert-ios-radio-label-padding: null !default;
  114. /// @prop - Padding top on the label for the radio alert
  115. $alert-ios-radio-label-padding-top: 13px !default;
  116. /// @prop - Padding end on the label for the radio alert
  117. $alert-ios-radio-label-padding-end: $alert-ios-radio-label-padding-top !default;
  118. /// @prop - Padding bottom on the label for the radio alert
  119. $alert-ios-radio-label-padding-bottom: $alert-ios-radio-label-padding-top !default;
  120. /// @prop - Padding start on the label for the radio alert
  121. $alert-ios-radio-label-padding-start: $alert-ios-radio-label-padding-end !default;
  122. /// @prop - Text color of the label for the radio alert
  123. $alert-ios-radio-label-text-color: initial !default;
  124. /// @prop - Text color of the label for the checked radio alert
  125. $alert-ios-radio-label-text-color-checked: $alert-ios-button-text-color !default;
  126. /// @prop - Min width of the radio alert
  127. $alert-ios-radio-min-width: 30px !default;
  128. /// @prop - Top of the icon in the radio alert
  129. $alert-ios-radio-icon-top: -7px !default;
  130. // deprecated
  131. $alert-ios-radio-icon-left: 7px !default;
  132. /// @prop - Start of the icon in the radio alert
  133. $alert-ios-radio-icon-start: $alert-ios-radio-icon-left !default;
  134. /// @prop - Width of the icon in the radio alert
  135. $alert-ios-radio-icon-width: 6px !default;
  136. /// @prop - Height of the icon in the radio alert
  137. $alert-ios-radio-icon-height: 12px !default;
  138. /// @prop - Border width of the icon in the radio alert
  139. $alert-ios-radio-icon-border-width: 2px !default;
  140. /// @prop - Border style of the icon in the radio alert
  141. $alert-ios-radio-icon-border-style: solid !default;
  142. /// @prop - Border color of the icon in the radio alert
  143. $alert-ios-radio-icon-border-color: $alert-ios-button-text-color !default;
  144. /// @prop - Transform of the icon in the radio alert
  145. $alert-ios-radio-icon-transform: rotate(45deg) !default;
  146. // deprecated
  147. $alert-ios-checkbox-label-padding: null !default;
  148. /// @prop - Padding top of the label for the checkbox in the alert
  149. $alert-ios-checkbox-label-padding-top: 13px !default;
  150. /// @prop - Padding end of the label for the checkbox in the alert
  151. $alert-ios-checkbox-label-padding-end: $alert-ios-checkbox-label-padding-top !default;
  152. /// @prop - Padding bottom of the label for the checkbox in the alert
  153. $alert-ios-checkbox-label-padding-bottom: $alert-ios-checkbox-label-padding-top !default;
  154. /// @prop - Padding start of the label for the checkbox in the alert
  155. $alert-ios-checkbox-label-padding-start: $alert-ios-checkbox-label-padding-end !default;
  156. /// @prop - Text color of the label for the checkbox in the alert
  157. $alert-ios-checkbox-label-text-color: initial !default;
  158. /// @prop - Text color of the label for the checked checkbox in the alert
  159. $alert-ios-checkbox-label-text-color-checked: initial !default;
  160. // deprecated
  161. $alert-ios-checkbox-margin: null !default;
  162. /// @prop - Margin top of the checkbox in the alert
  163. $alert-ios-checkbox-margin-top: 10px !default;
  164. /// @prop - Margin end of the checkbox in the alert
  165. $alert-ios-checkbox-margin-end: 6px !default;
  166. /// @prop - Margin bottom of the checkbox in the alert
  167. $alert-ios-checkbox-margin-bottom: 10px !default;
  168. /// @prop - Margin start of the checkbox in the alert
  169. $alert-ios-checkbox-margin-start: 16px !default;
  170. /// @prop - Size of the checkbox in the alert
  171. $alert-ios-checkbox-size: 21px !default;
  172. /// @prop - Border width of the checkbox in the alert
  173. $alert-ios-checkbox-border-width: $hairlines-width !default;
  174. /// @prop - Border style of the checkbox in the alert
  175. $alert-ios-checkbox-border-style: solid !default;
  176. /// @prop - Border radius of the checkbox in the alert
  177. $alert-ios-checkbox-border-radius: 50% !default;
  178. /// @prop - Border color of the checkbox in the alert when off
  179. $alert-ios-checkbox-border-color-off: $list-ios-border-color !default;
  180. /// @prop - Border color of the checkbox in the alert when on
  181. $alert-ios-checkbox-border-color-on: color($colors-ios, primary) !default;
  182. /// @prop - Background color of the checkbox in the alert when off
  183. $alert-ios-checkbox-background-color-off: $list-ios-background-color !default;
  184. /// @prop - Background color of the checkbox in the alert when on
  185. $alert-ios-checkbox-background-color-on: color($colors-ios, primary) !default;
  186. /// @prop - Top of the icon in the checkbox alert
  187. $alert-ios-checkbox-icon-top: 4px !default;
  188. // deprecated
  189. $alert-ios-checkbox-icon-left: 7px !default;
  190. /// @prop - Start of the icon in the checkbox alert
  191. $alert-ios-checkbox-icon-start: $alert-ios-checkbox-icon-left !default;
  192. /// @prop - Width of the icon in the checkbox alert
  193. $alert-ios-checkbox-icon-width: 4px !default;
  194. /// @prop - Height of the icon in the checkbox alert
  195. $alert-ios-checkbox-icon-height: 9px !default;
  196. /// @prop - Border width of the icon in the checkbox alert
  197. $alert-ios-checkbox-icon-border-width: $alert-ios-checkbox-border-width !default;
  198. /// @prop - Border style of the icon in the checkbox alert
  199. $alert-ios-checkbox-icon-border-style: $alert-ios-checkbox-border-style !default;
  200. /// @prop - Border color of the icon in the checkbox alert
  201. $alert-ios-checkbox-icon-border-color: $background-ios-color !default;
  202. /// @prop - Transform of the icon in the checkbox alert
  203. $alert-ios-checkbox-icon-transform: rotate(45deg) !default;
  204. .alert-ios .alert-wrapper {
  205. @include border-radius($alert-ios-border-radius);
  206. overflow: hidden;
  207. max-width: $alert-ios-max-width;
  208. background-color: $alert-ios-background;
  209. box-shadow: $alert-ios-box-shadow;
  210. }
  211. // iOS Alert Header
  212. // --------------------------------------------------
  213. .alert-ios .alert-head {
  214. @include text-align($alert-ios-head-text-align);
  215. @include deprecated-variable(padding, $alert-ios-head-padding) {
  216. @include padding($alert-ios-head-padding-top, $alert-ios-head-padding-end, $alert-ios-head-padding-bottom, $alert-ios-head-padding-start);
  217. }
  218. }
  219. .alert-ios .alert-title {
  220. @include margin($alert-ios-title-margin-top, null, null, null);
  221. font-size: $alert-ios-title-font-size;
  222. font-weight: $alert-ios-title-font-weight;
  223. }
  224. .alert-ios .alert-sub-title {
  225. font-size: $alert-ios-sub-title-font-size;
  226. color: $alert-ios-sub-title-text-color;
  227. }
  228. // iOS Alert Message
  229. // --------------------------------------------------
  230. .alert-ios .alert-message,
  231. .alert-ios .alert-input-group {
  232. @include text-align($alert-ios-message-text-align);
  233. font-size: $alert-ios-message-font-size;
  234. color: $alert-ios-message-text-color;
  235. @include deprecated-variable(padding, $alert-ios-message-padding) {
  236. @include padding($alert-ios-message-padding-top, $alert-ios-message-padding-end, $alert-ios-message-padding-bottom, $alert-ios-message-padding-start);
  237. }
  238. }
  239. .alert-ios .alert-message {
  240. max-height: $alert-ios-content-max-height;
  241. }
  242. .alert-ios .alert-message:empty {
  243. @include deprecated-variable(padding, $alert-ios-message-padding-empty) {
  244. @include padding($alert-ios-message-empty-padding-top, $alert-ios-message-empty-padding-end, $alert-ios-message-empty-padding-bottom, $alert-ios-message-empty-padding-start);
  245. }
  246. }
  247. // iOS Alert Input
  248. // --------------------------------------------------
  249. .alert-ios .alert-input {
  250. @include appearance(none);
  251. @include margin($alert-ios-input-margin-top, null, null, null);
  252. @include border-radius($alert-ios-input-border-radius);
  253. border: $alert-ios-input-border;
  254. background-color: $alert-ios-input-background-color;
  255. @include deprecated-variable(padding, $alert-ios-input-padding) {
  256. @include padding($alert-ios-input-padding-top, $alert-ios-input-padding-end, $alert-ios-input-padding-bottom, $alert-ios-input-padding-start);
  257. }
  258. }
  259. // iOS Alert Radio/Checkbox Group
  260. // --------------------------------------------------
  261. .alert-ios .alert-radio-group,
  262. .alert-ios .alert-checkbox-group {
  263. overflow: scroll;
  264. max-height: $alert-ios-content-max-height;
  265. border-top: $alert-ios-list-border-top;
  266. -webkit-overflow-scrolling: touch;
  267. }
  268. .alert-ios .alert-tappable {
  269. display: flex;
  270. min-height: $alert-ios-button-min-height;
  271. }
  272. // iOS Alert Radio Label
  273. // --------------------------------------------------
  274. .alert-ios .alert-radio-label {
  275. overflow: hidden;
  276. flex: 1;
  277. order: 0;
  278. text-overflow: ellipsis;
  279. white-space: nowrap;
  280. color: $alert-ios-radio-label-text-color;
  281. @include deprecated-variable(padding, $alert-ios-radio-label-padding) {
  282. @include padding($alert-ios-radio-label-padding-top, $alert-ios-radio-label-padding-end, $alert-ios-radio-label-padding-bottom, $alert-ios-radio-label-padding-start);
  283. }
  284. }
  285. // iOS Alert Radio Label: Checked
  286. // --------------------------------------------------
  287. .alert-ios [aria-checked=true] .alert-radio-label {
  288. color: $alert-ios-radio-label-text-color-checked;
  289. }
  290. // iOS Alert Radio Checkmark: Unchecked
  291. // -----------------------------------------
  292. .alert-ios .alert-radio-icon {
  293. position: relative;
  294. order: 1;
  295. min-width: $alert-ios-radio-min-width;
  296. }
  297. // iOS Alert Radio Checked
  298. // -----------------------------------------
  299. .alert-ios [aria-checked=true] .alert-radio-inner {
  300. @include position($alert-ios-radio-icon-top, null, null, $alert-ios-radio-icon-start);
  301. position: absolute;
  302. width: $alert-ios-radio-icon-width;
  303. height: $alert-ios-radio-icon-height;
  304. border-width: $alert-ios-radio-icon-border-width;
  305. border-top-width: 0;
  306. border-left-width: 0;
  307. border-style: $alert-ios-radio-icon-border-style;
  308. border-color: $alert-ios-radio-icon-border-color;
  309. transform: $alert-ios-radio-icon-transform;
  310. }
  311. // iOS Alert Checkbox Label
  312. // --------------------------------------------------
  313. .alert-ios .alert-checkbox-label {
  314. overflow: hidden;
  315. flex: 1;
  316. text-overflow: ellipsis;
  317. white-space: nowrap;
  318. color: $alert-ios-checkbox-label-text-color;
  319. @include deprecated-variable(padding, $alert-ios-checkbox-label-padding) {
  320. @include padding($alert-ios-checkbox-label-padding-top, $alert-ios-checkbox-label-padding-end, $alert-ios-checkbox-label-padding-bottom, $alert-ios-checkbox-label-padding-start);
  321. }
  322. }
  323. .alert-ios [aria-checked=true] .alert-checkbox-label {
  324. color: $alert-ios-checkbox-label-text-color-checked;
  325. }
  326. // iOS Alert Checkbox Outer Circle: Unchecked
  327. // -----------------------------------------
  328. .alert-ios .alert-checkbox-icon {
  329. @include border-radius($alert-ios-checkbox-border-radius);
  330. position: relative;
  331. width: $alert-ios-checkbox-size;
  332. height: $alert-ios-checkbox-size;
  333. border-width: $alert-ios-checkbox-border-width;
  334. border-style: $alert-ios-checkbox-border-style;
  335. border-color: $alert-ios-checkbox-border-color-off;
  336. background-color: $alert-ios-checkbox-background-color-off;
  337. @include deprecated-variable(margin, $alert-ios-checkbox-margin) {
  338. @include margin($alert-ios-checkbox-margin-top, $alert-ios-checkbox-margin-end, $alert-ios-checkbox-margin-bottom, $alert-ios-checkbox-margin-start);
  339. }
  340. }
  341. // iOS Alert Checkbox Outer Circle: Checked
  342. // -----------------------------------------
  343. .alert-ios [aria-checked=true] .alert-checkbox-icon {
  344. border-color: $alert-ios-checkbox-border-color-on;
  345. background-color: $alert-ios-checkbox-background-color-on;
  346. }
  347. // iOS Alert Checkbox Inner Checkmark: Checked
  348. // -----------------------------------------
  349. .alert-ios [aria-checked=true] .alert-checkbox-inner {
  350. @include position($alert-ios-checkbox-icon-top, null, null, $alert-ios-checkbox-icon-start);
  351. position: absolute;
  352. width: $alert-ios-checkbox-icon-width;
  353. height: $alert-ios-checkbox-icon-height;
  354. border-width: $alert-ios-checkbox-icon-border-width;
  355. border-top-width: 0;
  356. border-left-width: 0;
  357. border-style: $alert-ios-checkbox-icon-border-style;
  358. border-color: $alert-ios-checkbox-icon-border-color;
  359. transform: $alert-ios-checkbox-icon-transform;
  360. }
  361. // iOS Alert Button
  362. // --------------------------------------------------
  363. .alert-ios .alert-button-group {
  364. @include margin-horizontal(null, -$alert-ios-button-border-width);
  365. flex-wrap: $alert-ios-button-group-flex-wrap;
  366. }
  367. .alert-ios .alert-button {
  368. @include margin($alert-ios-button-margin);
  369. @include border-radius($alert-ios-button-border-radius);
  370. overflow: hidden;
  371. flex: $alert-ios-button-flex;
  372. min-width: $alert-ios-button-min-width;
  373. height: $alert-ios-button-min-height;
  374. border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
  375. border-right: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
  376. font-size: $alert-ios-button-font-size;
  377. color: $alert-ios-button-text-color;
  378. background-color: $alert-ios-button-background-color;
  379. }
  380. .alert-ios .alert-button:last-child {
  381. border-right: 0;
  382. font-weight: $alert-ios-button-main-font-weight;
  383. }
  384. .alert-ios .alert-button.activated {
  385. background-color: $alert-ios-button-background-color-activated;
  386. }