@import "../../globals.ios"; @import "./alert"; // iOS Alerts // -------------------------------------------------- $alert-ios-max-width: 270px !default; $alert-ios-border-radius: 13px !default; $alert-ios-background: #f8f8f8 !default; $alert-ios-box-shadow: none !default; $alert-ios-head-text-align: center !default; $alert-ios-head-padding: 12px 16px 7px !default; $alert-ios-title-margin-top: 8px !default; $alert-ios-title-font-weight: 600 !default; $alert-ios-title-font-size: 17px !default; $alert-ios-sub-title-font-size: 14px !default; $alert-ios-sub-title-text-color: #666 !default; $alert-ios-message-padding: 0px 16px 21px !default; $alert-ios-message-text-color: inherit !default; $alert-ios-message-text-align: center !default; $alert-ios-message-font-size: 13px !default; $alert-ios-message-padding-empty: 0 0 12px 0 !default; $alert-ios-content-max-height: 240px !default; $alert-ios-input-padding: 6px !default; $alert-ios-input-margin-top: 10px !default; $alert-ios-input-background-color: #fff !default; $alert-ios-input-border: 1px solid #ccc !default; $alert-ios-input-border-radius: 4px !default; $alert-ios-button-group-flex-wrap: wrap !default; $alert-ios-button-margin: 0 !default; $alert-ios-button-flex: 1 1 auto !default; $alert-ios-button-min-height: 44px !default; $alert-ios-button-min-width: 50% !default; $alert-ios-button-font-size: 17px !default; $alert-ios-button-text-color: map-get($colors-ios, primary) !default; $alert-ios-button-background-color: transparent !default; $alert-ios-button-background-color-activated: #e9e9e9 !default; $alert-ios-button-border-radius: 0 !default; $alert-ios-button-border-width: 1px !default; $alert-ios-button-border-style: solid !default; $alert-ios-button-border-color: #dbdbdf !default; $alert-ios-button-main-font-weight: bold !default; $alert-ios-radio-label-padding: 13px !default; $alert-ios-radio-icon-min-width: 30px !default; $alert-ios-checkbox-icon-size: 21px !default; $alert-ios-checkbox-icon-border-radius: 50% !default; $alert-ios-checkbox-icon-border-width: 1px !default; $alert-ios-checkbox-icon-border-style: solid !default; $alert-ios-checkbox-icon-border-color-off: $list-ios-border-color !default; $alert-ios-checkbox-icon-border-color-on: map-get($colors-ios, primary) !default; $alert-ios-checkbox-background-color-off: $list-ios-background-color !default; $alert-ios-checkbox-background-color-on: map-get($colors-ios, primary) !default; $alert-ios-checkbox-icon-checkmark-width: $alert-ios-checkbox-icon-border-width !default; $alert-ios-checkbox-icon-checkmark-style: $alert-ios-checkbox-icon-border-style !default; $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; .alert-wrapper { max-width: $alert-ios-max-width; border-radius: $alert-ios-border-radius; background-color: $alert-ios-background; box-shadow: $alert-ios-box-shadow; overflow: hidden; } // iOS Alert Header // -------------------------------------------------- .alert-head { text-align: $alert-ios-head-text-align; padding: $alert-ios-head-padding; } .alert-title { margin-top: $alert-ios-title-margin-top; font-weight: $alert-ios-title-font-weight; font-size: $alert-ios-title-font-size; } .alert-sub-title { font-size: $alert-ios-sub-title-font-size; color: $alert-ios-sub-title-text-color; } // iOS Alert Message // -------------------------------------------------- .alert-message, .alert-input-group { padding: $alert-ios-message-padding; font-size: $alert-ios-message-font-size; color: $alert-ios-message-text-color; text-align: $alert-ios-message-text-align; } .alert-message { max-height: $alert-ios-content-max-height; &:empty { padding: $alert-ios-message-padding-empty; } } // iOS Alert Input // -------------------------------------------------- .alert-input { margin-top: $alert-ios-input-margin-top; padding: $alert-ios-input-padding; border: $alert-ios-input-border; border-radius: $alert-ios-input-border-radius; background-color: $alert-ios-input-background-color; -webkit-appearance: none; } // iOS Alert Radio/Checkbox Group // -------------------------------------------------- .alert-radio-group, .alert-checkbox-group { max-height: $alert-ios-content-max-height; border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color; overflow: scroll; } .alert-tappable { display: flex; min-height: $alert-ios-button-min-height; cursor: pointer; } // iOS Alert Radio // -------------------------------------------------- .alert-radio-label { flex: 1; order: 0; padding: $alert-ios-radio-label-padding; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } .alert-radio-icon { position: relative; order: 1; min-width: $alert-ios-radio-icon-min-width; } .alert-radio[aria-checked=true] { color: $alert-ios-button-text-color; .alert-radio-icon:after { position: absolute; border-width: 2px; border-style: solid; border-color: $alert-ios-button-text-color; top: 13px; left: 7px; width: 4px; height: 10px; border-left: none; border-top: none; content: ''; transform: rotate(45deg); } } // iOS Alert Checkbox // -------------------------------------------------- .alert-checkbox-label { flex: 1; order: 0; padding: 13px; text-align: auto; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } .alert-checkbox-icon { margin: 10px 6px 10px 16px; position: relative; width: $alert-ios-checkbox-icon-size; height: $alert-ios-checkbox-icon-size; border-radius: $alert-ios-checkbox-icon-border-radius; border-width: $alert-ios-checkbox-icon-border-width; border-style: $alert-ios-checkbox-icon-border-style; border-color: $alert-ios-checkbox-icon-border-color-off; background-color: $alert-ios-checkbox-background-color-off; } .alert-checkbox[aria-checked=true] .alert-checkbox-icon { background-color: $alert-ios-checkbox-background-color-on; border-color: $alert-ios-checkbox-icon-border-color-on; .alert-checkbox-inner { position: absolute; border-width: $alert-ios-checkbox-icon-checkmark-width; border-style: $alert-ios-checkbox-icon-checkmark-style; border-color: $alert-ios-checkbox-icon-checkmark-color; top: 4px; left: 7px; width: 4px; height: 9px; border-left: none; border-top: none; transform: rotate(45deg); } } // iOS Alert Button // -------------------------------------------------- .alert-button-group { flex-wrap: $alert-ios-button-group-flex-wrap; margin-right: -$alert-ios-button-border-width; } .alert-button { margin: $alert-ios-button-margin; flex: $alert-ios-button-flex; min-width: $alert-ios-button-min-width; font-size: $alert-ios-button-font-size; height: $alert-ios-button-min-height; border-radius: $alert-ios-button-border-radius; border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color; border-right: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color; color: $alert-ios-button-text-color; background-color: $alert-ios-button-background-color; overflow: hidden; &:last-child { font-weight: $alert-ios-button-main-font-weight; border-right: 0; } &.activated { background-color: $alert-ios-button-background-color-activated; } } &.hairlines { .alert-radio-group, .alert-checkbox-group { border-width: $hairlines-width; } .alert-input { border-width: $hairlines-width; } .alert-button { border-top-width: $hairlines-width; border-right-width: $hairlines-width; } }