mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 21:15:24 +08:00
264 lines
6.5 KiB
SCSS
264 lines
6.5 KiB
SCSS
@import "../../globals.wp";
|
|
@import "./alert";
|
|
|
|
// Windows Alerts
|
|
// --------------------------------------------------
|
|
|
|
$alert-wp-width: 100% !default;
|
|
$alert-wp-border-radius: 0 !default;
|
|
$alert-wp-border-width: 1px !default;
|
|
$alert-wp-border-color: map-get($colors-wp, primary) !default;
|
|
$alert-wp-background-color: #fafafa !default;
|
|
|
|
$alert-wp-head-text-align: left !default;
|
|
$alert-wp-head-padding: 20px 20px 5px 20px !default;
|
|
|
|
$alert-wp-title-font-size: 20px !default;
|
|
$alert-wp-title-font-weight: 400 !default;
|
|
$alert-wp-sub-title-font-size: 16px !default;
|
|
|
|
$alert-wp-message-font-size: 13px !default;
|
|
$alert-wp-message-padding: 0 20px 10px 20px !default;
|
|
$alert-wp-message-text-color: #000 !default;
|
|
|
|
$alert-wp-input-border-color: $input-wp-border-color !default;
|
|
$alert-wp-input-text-color: #000000 !default;
|
|
$alert-wp-input-highlight-color: map-get($colors-wp, primary) !default;
|
|
$alert-wp-input-margin-top: 5px !default;
|
|
$alert-wp-input-margin-bottom: 5px !default;
|
|
$alert-wp-input-padding-vertical: 0 !default;
|
|
$alert-wp-input-padding-horizontal: 8px !default;
|
|
|
|
$alert-wp-button-padding: 5px !default;
|
|
$alert-wp-button-text-color: #000 !default;
|
|
$alert-wp-button-background-color: #B8B8B8 !default;
|
|
$alert-wp-button-border-radius: 0 !default;
|
|
$alert-wp-button-width: 49.5% !default;
|
|
$alert-wp-button-margin-right: 1% !default;
|
|
$alert-wp-button-font-weight: 300 !default;
|
|
|
|
$alert-wp-checkbox-background-color: map-get($colors-wp, primary) !default;
|
|
$alert-wp-checkbox-border-color: $input-wp-border-color !default;
|
|
$alert-wp-radio-background-color: map-get($colors-wp, primary) !default;
|
|
$alert-wp-radio-border-color: $input-wp-border-color !default;
|
|
|
|
$alert-wp-buttons-padding: 8px 20px 20px 20px !default;
|
|
$alert-wp-buttons-justify-content: flex-end !default;
|
|
|
|
|
|
.alert-wrapper {
|
|
width: $alert-wp-width;
|
|
border-radius: $alert-wp-border-radius;
|
|
background-color: $alert-wp-background-color;
|
|
border: $alert-wp-border-width solid $alert-wp-border-color;
|
|
}
|
|
|
|
// Windows Alert Header
|
|
// --------------------------------------------------
|
|
|
|
.alert-head {
|
|
text-align: $alert-wp-head-text-align;
|
|
padding: $alert-wp-head-padding;
|
|
}
|
|
|
|
.alert-title {
|
|
font-size: $alert-wp-title-font-size;
|
|
font-weight: $alert-wp-title-font-weight;
|
|
}
|
|
|
|
.alert-sub-title {
|
|
font-size: $alert-wp-sub-title-font-size;
|
|
}
|
|
|
|
|
|
// Windows Alert Message
|
|
// --------------------------------------------------
|
|
|
|
.alert-message,
|
|
.alert-input-group {
|
|
padding: $alert-wp-message-padding;
|
|
color: $alert-wp-message-text-color;
|
|
}
|
|
|
|
.alert-message {
|
|
font-size: $alert-wp-message-font-size;
|
|
max-height: 240px;
|
|
|
|
&:empty {
|
|
padding: 0;
|
|
}
|
|
}
|
|
|
|
|
|
// Windows Alert Input
|
|
// --------------------------------------------------
|
|
|
|
.alert-input {
|
|
border: 2px solid $alert-wp-input-border-color;
|
|
color: $alert-wp-input-text-color;
|
|
margin: $alert-wp-input-margin-top 0 $alert-wp-input-margin-bottom 0;
|
|
padding: $alert-wp-input-padding-vertical $alert-wp-input-padding-horizontal;
|
|
line-height: 3rem;
|
|
|
|
&:focus {
|
|
border-color: $alert-wp-input-highlight-color;
|
|
}
|
|
}
|
|
|
|
|
|
// Windows Alert Radio/Checkbox Group
|
|
// --------------------------------------------------
|
|
|
|
.alert-radio-group,
|
|
.alert-checkbox-group {
|
|
position: relative;
|
|
border-top: 1px solid $alert-wp-input-border-color;
|
|
border-bottom: 1px solid $alert-wp-input-border-color;
|
|
max-height: 240px;
|
|
overflow: auto;
|
|
}
|
|
|
|
.alert-tappable {
|
|
position: relative;
|
|
overflow: hidden;
|
|
display: flex;
|
|
min-height: 44px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
|
|
// Windows Alert Radio
|
|
// --------------------------------------------------
|
|
|
|
.alert-radio-label {
|
|
flex: 1;
|
|
text-align: auto;
|
|
padding: 13px 26px;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.alert-radio-icon {
|
|
position: relative;
|
|
top: 13px;
|
|
left: 13px;
|
|
display: block;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin: 0;
|
|
border-width: 2px;
|
|
border-style: solid;
|
|
border-color: $alert-wp-radio-border-color;
|
|
border-radius: 50%;
|
|
|
|
&:after {
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 2px;
|
|
width: 8px;
|
|
height: 8px;
|
|
background-color: $alert-wp-radio-background-color;
|
|
border-radius: 50%;
|
|
content: '';
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.alert-radio[aria-checked=true] {
|
|
color: $alert-wp-button-text-color;
|
|
|
|
.alert-radio-icon {
|
|
border-color: $alert-wp-button-text-color;
|
|
}
|
|
|
|
.alert-radio-icon:after {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
|
|
// Windows Alert Checkbox
|
|
// --------------------------------------------------
|
|
|
|
.alert-checkbox-label {
|
|
flex: 1;
|
|
text-align: auto;
|
|
padding: 13px 26px;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.alert-checkbox-icon {
|
|
position: relative;
|
|
top: 13px;
|
|
left: 13px;
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 2px;
|
|
border-width: 2px;
|
|
border-style: solid;
|
|
border-color: $alert-wp-checkbox-border-color;
|
|
background-color: transparent;
|
|
}
|
|
|
|
.alert-checkbox[aria-checked=true] .alert-checkbox-icon {
|
|
background-color: $alert-wp-checkbox-background-color;
|
|
border-color: $alert-wp-checkbox-background-color;
|
|
|
|
&:after {
|
|
position: absolute;
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
border-color: $alert-wp-background-color;
|
|
top: -2px;
|
|
left: 3px;
|
|
width: 6px;
|
|
height: 12px;
|
|
border-left: none;
|
|
border-top: none;
|
|
content: '';
|
|
transform: rotate(45deg);
|
|
}
|
|
}
|
|
|
|
|
|
// Windows Alert Button
|
|
// --------------------------------------------------
|
|
|
|
.alert-button-group {
|
|
padding: $alert-wp-buttons-padding;
|
|
justify-content: $alert-wp-buttons-justify-content;
|
|
flex-wrap: wrap-reverse;
|
|
|
|
&.vertical .alert-button {
|
|
width: 100%;
|
|
margin-top: 5px;
|
|
|
|
&:first-child:not(:only-child) {
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.alert-button {
|
|
position: relative;
|
|
overflow: hidden;
|
|
padding: $alert-wp-button-padding;
|
|
color: $alert-wp-button-text-color;
|
|
background-color: $alert-wp-button-background-color;
|
|
border-radius: $alert-wp-button-border-radius;
|
|
width: $alert-wp-button-width;
|
|
margin-right: 0;
|
|
font-weight: $alert-wp-button-font-weight;
|
|
|
|
&:first-child:not(:only-child) {
|
|
margin-right: $alert-wp-button-margin-right;
|
|
}
|
|
|
|
&.activated {
|
|
background-color: color-shade($alert-wp-button-background-color);
|
|
}
|
|
}
|