mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
164 lines
4.2 KiB
SCSS
164 lines
4.2 KiB
SCSS
.button {
|
|
position: relative;
|
|
display: inline-block;
|
|
margin: 0;
|
|
|
|
padding: $button-padding;
|
|
min-height: $button-min-height;
|
|
|
|
border-width: $button-border-width;
|
|
border-style: solid;
|
|
border-radius: $button-border-radius;
|
|
|
|
color: $button-color;
|
|
vertical-align: top;
|
|
|
|
text-align: center;
|
|
|
|
text-overflow: ellipsis;
|
|
font-size: $button-font-size;
|
|
line-height: $button-line-height;
|
|
|
|
cursor: pointer;
|
|
|
|
[class^="icon-"],
|
|
[class*=" icon-"] {
|
|
display: inline-block;
|
|
padding: 0;
|
|
vertical-align: inherit;
|
|
font-size: $button-icon-font-size;
|
|
line-height: $button-line-height - 1;
|
|
}
|
|
|
|
&.button-icon {
|
|
padding: $button-clear-padding;
|
|
background: none;
|
|
|
|
[class^="icon-"],
|
|
[class*=" icon-"] {
|
|
font-size: $button-icon-large-font-size;
|
|
}
|
|
}
|
|
|
|
&.button-clear {
|
|
@include transition(opacity .1s);
|
|
padding: $button-clear-padding;
|
|
border: none;
|
|
background: none;
|
|
box-shadow: none;
|
|
|
|
&:active, &.active {
|
|
opacity: 0.3;
|
|
}
|
|
}
|
|
|
|
&.button-default {
|
|
@include button-style($button-default-bg, $button-default-border, $button-default-active-bg, $button-default-active-border, $gray-dark);
|
|
@include button-clear($button-default-border);
|
|
@include button-outline($button-default-border, $gray-dark);
|
|
}
|
|
&.button-secondary {
|
|
@include button-style($button-secondary-bg, $button-secondary-border, $button-secondary-active-bg, $button-secondary-active-border, $gray-dark);
|
|
@include button-clear($button-secondary-border);
|
|
@include button-outline($button-secondary-border, $gray-dark);
|
|
}
|
|
&.button-primary {
|
|
@include button-style($button-primary-bg, $button-primary-border, $button-primary-active-bg, $button-primary-active-border, $white);
|
|
@include button-clear($button-primary-bg);
|
|
@include button-outline($button-primary-bg);
|
|
}
|
|
&.button-info {
|
|
@include button-style($button-info-bg, $button-info-border, $button-info-active-bg, $button-info-active-border, $white);
|
|
@include button-clear($button-info-bg);
|
|
@include button-outline($button-info-bg);
|
|
}
|
|
&.button-success {
|
|
@include button-style($button-success-bg, $button-success-border, $button-success-active-bg, $button-success-active-border, $white);
|
|
@include button-clear($button-success-bg);
|
|
@include button-outline($button-success-bg);
|
|
}
|
|
&.button-warning {
|
|
@include button-style($button-warning-bg, $button-warning-border, $button-warning-active-bg, $button-warning-active-border, $white);
|
|
@include button-clear($button-warning-bg);
|
|
@include button-outline($button-warning-bg);
|
|
}
|
|
&.button-danger {
|
|
@include button-style($button-danger-bg, $button-danger-border, $button-danger-active-bg, $button-danger-active-border, $white);
|
|
@include button-clear($button-danger-bg);
|
|
@include button-outline($button-danger-bg);
|
|
}
|
|
&.button-dark {
|
|
@include button-style($button-dark-bg, $button-dark-border, $button-dark-active-bg, $button-dark-active-border, $white);
|
|
@include button-clear($button-dark-bg);
|
|
@include button-outline($button-dark-bg);
|
|
}
|
|
|
|
&.button-outline {
|
|
@include transition(opacity .1s);
|
|
background: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
&.button-icon {
|
|
border: none;
|
|
background: none;
|
|
&:active, &.active {
|
|
background: none;
|
|
box-shadow: none;
|
|
text-shadow: 0px 0px 10px #fff;
|
|
}
|
|
}
|
|
|
|
&.block, &.button-full {
|
|
margin-top: $button-block-margin;
|
|
margin-bottom: $button-block-margin;
|
|
}
|
|
|
|
}
|
|
|
|
.button-small {
|
|
font-size: $button-font-size - 4;
|
|
min-height: 32px;
|
|
padding: 1px 8px 1px 8px;
|
|
|
|
[class^="icon-"],
|
|
[class*=" icon-"] {
|
|
font-size: $button-icon-font-size - 4;
|
|
}
|
|
}
|
|
|
|
.button-large {
|
|
font-size: $button-font-size + 8;
|
|
min-height: $button-min-height + 8;
|
|
padding: 12px 18px 12px 18px;
|
|
|
|
[class^="icon-"],
|
|
[class*=" icon-"] {
|
|
font-size: $button-icon-font-size + 8;
|
|
}
|
|
}
|
|
|
|
.padding > .button.block:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.button-full,
|
|
.button-full > .button {
|
|
display: block;
|
|
margin-right: 0;
|
|
margin-left: 0;
|
|
border-right-width: 0;
|
|
border-left-width: 0;
|
|
border-radius: 0;
|
|
}
|
|
|
|
button.block,
|
|
button.button-full,
|
|
.button-full > button.button {
|
|
width: 100%;
|
|
}
|
|
|
|
a.button {
|
|
text-decoration: none;
|
|
}
|