| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- @import "../../themes/ionic.globals.ios";
-
- // iOS Button
- // --------------------------------------------------
-
- // deprecated
- $button-ios-margin: null !default;
-
- /// @prop - Margin top of the button
- $button-ios-margin-top: .4rem !default;
-
- /// @prop - Margin end of the button
- $button-ios-margin-end: .2rem !default;
-
- /// @prop - Margin bottom of the button
- $button-ios-margin-bottom: .4rem !default;
-
- /// @prop - Margin start of the button
- $button-ios-margin-start: .2rem !default;
-
- // deprecated
- $button-ios-padding: null !default;
-
- /// @prop - Padding top of the button
- $button-ios-padding-top: 0 !default;
-
- /// @prop - Padding end of the button
- $button-ios-padding-end: 1em !default;
-
- /// @prop - Padding bottom of the button
- $button-ios-padding-bottom: $button-ios-padding-top !default;
-
- /// @prop - Padding start of the button
- $button-ios-padding-start: $button-ios-padding-end !default;
-
- /// @prop - Height of the button
- $button-ios-height: 2.8em !default;
-
- /// @prop - Border radius of the button
- $button-ios-border-radius: 4px !default;
-
- /// @prop - Font size of the button text
- $button-ios-font-size: 1.6rem !default;
-
- /// @prop - Background color of the button
- $button-ios-background-color: color($colors-ios, primary) !default;
-
- /// @prop - Text color of the button
- $button-ios-text-color: color-contrast($colors-ios, $button-ios-background-color) !default;
-
- /// @prop - Background color of the activated button
- $button-ios-background-color-activated: color-shade($button-ios-background-color) !default;
-
- /// @prop - Opacity of the activated button
- $button-ios-opacity-activated: 1 !default;
-
- /// @prop - Opacity of the button on hover
- $button-ios-opacity-hover: .8 !default;
-
-
- // iOS Large Button
- // --------------------------------------------------
-
- // deprecated
- $button-ios-large-padding: null !default;
-
- /// @prop - Padding top of the large button
- $button-ios-large-padding-top: 0 !default;
-
- /// @prop - Padding end of the large button
- $button-ios-large-padding-end: 1em !default;
-
- /// @prop - Padding bottom of the large button
- $button-ios-large-padding-bottom: $button-ios-large-padding-top !default;
-
- /// @prop - Padding start of the large button
- $button-ios-large-padding-start: $button-ios-large-padding-end !default;
-
- /// @prop - Height of the large button
- $button-ios-large-height: 2.8em !default;
-
- /// @prop - Font size of the large button
- $button-ios-large-font-size: 2rem !default;
-
-
- // iOS Small Button
- // --------------------------------------------------
-
- // deprecated
- $button-ios-small-padding: null !default;
-
- /// @prop - Padding top of the small button
- $button-ios-small-padding-top: 0 !default;
-
- /// @prop - Padding end of the small button
- $button-ios-small-padding-end: .9em !default;
-
- /// @prop - Padding bottom of the small button
- $button-ios-small-padding-bottom: $button-ios-small-padding-top !default;
-
- /// @prop - Padding start of the small button
- $button-ios-small-padding-start: $button-ios-small-padding-end !default;
-
- /// @prop - Height of the small button
- $button-ios-small-height: 2.1em !default;
-
- /// @prop - Font size of the small button
- $button-ios-small-font-size: 1.3rem !default;
-
- /// @prop - Font size of an icon in the small button
- $button-ios-small-icon-font-size: 1.3em !default;
-
-
- // iOS Outline Button
- // --------------------------------------------------
-
- /// @prop - Border width of the outline button
- $button-ios-outline-border-width: 1px !default;
-
- /// @prop - Border style of the outline button
- $button-ios-outline-border-style: solid !default;
-
- /// @prop - Border radius of the outline button
- $button-ios-outline-border-radius: $button-ios-border-radius !default;
-
- /// @prop - Border color of the outline button
- $button-ios-outline-border-color: $button-ios-background-color !default;
-
- /// @prop - Text color of the outline button
- $button-ios-outline-text-color: $button-ios-background-color !default;
-
- /// @prop - Background color of the outline button
- $button-ios-outline-background-color: transparent !default;
-
- /// @prop - Text color of the activated outline button
- $button-ios-outline-text-color-activated: color-contrast($colors-ios, $button-ios-background-color) !default;
-
- /// @prop - Background color of the activated outline button
- $button-ios-outline-background-color-activated: $button-ios-background-color !default;
-
- /// @prop - Opacity of the activated outline button
- $button-ios-outline-opacity-activated: 1 !default;
-
-
- // iOS Clear Button
- // --------------------------------------------------
-
- /// @prop - Border color of the clear button
- $button-ios-clear-border-color: transparent !default;
-
- /// @prop - Background color of the clear button
- $button-ios-clear-background-color: transparent !default;
-
- /// @prop - Background color of the activated clear button
- $button-ios-clear-background-color-activated: $button-ios-clear-background-color !default;
-
- /// @prop - Opacity of the activated clear button
- $button-ios-clear-opacity-activated: .4 !default;
-
- /// @prop - Text color of the clear button on hover
- $button-ios-clear-text-color-hover: $button-ios-background-color !default;
-
- /// @prop - Opacity of the clear button on hover
- $button-ios-clear-opacity-hover: .6 !default;
-
-
- // iOS Round Button
- // --------------------------------------------------
-
- // deprecated
- $button-ios-round-padding: null !default;
-
- /// @prop - Padding top of the round button
- $button-ios-round-padding-top: $button-round-padding-top !default;
-
- /// @prop - Padding end of the round button
- $button-ios-round-padding-end: $button-round-padding-end !default;
-
- /// @prop - Padding bottom of the round button
- $button-ios-round-padding-bottom: $button-round-padding-bottom !default;
-
- /// @prop - Padding start of the round button
- $button-ios-round-padding-start: $button-round-padding-start !default;
-
- /// @prop - Border radius of the round button
- $button-ios-round-border-radius: $button-round-border-radius !default;
-
-
- // iOS Decorator Button
- // --------------------------------------------------
-
- /// @prop - Font weight of the strong button
- $button-ios-strong-font-weight: 600 !default;
-
-
- // iOS Default Button
- // --------------------------------------------------
-
- .button-ios {
- @include border-radius($button-ios-border-radius);
-
- height: $button-ios-height;
-
- font-size: $button-ios-font-size;
-
- color: $button-ios-text-color;
- background-color: $button-ios-background-color;
-
- @include deprecated-variable(margin, $button-ios-margin) {
- @include margin($button-ios-margin-top, $button-ios-margin-end, $button-ios-margin-bottom, $button-ios-margin-start);
- }
-
- @include deprecated-variable(padding, $button-ios-padding) {
- @include padding($button-ios-padding-top, $button-ios-padding-end, $button-ios-padding-bottom, $button-ios-padding-start);
- }
- }
-
- .button-ios.activated {
- background-color: $button-ios-background-color-activated;
- opacity: $button-ios-opacity-activated;
- }
-
- .button-ios:hover:not(.disable-hover) {
- opacity: $button-ios-opacity-hover;
- }
-
-
- // iOS Default Button Color Mixin
- // --------------------------------------------------
-
- @mixin ios-button-default($color-name, $color-base, $color-contrast) {
- $bg-color: $color-base;
- $bg-color-activated: color-shade($bg-color);
- $fg-color: $color-contrast;
-
- .button-ios-#{$color-name} {
- color: $fg-color;
- background-color: $bg-color;
- }
-
- .button-ios-#{$color-name}.activated {
- background-color: $bg-color-activated;
- }
- }
-
-
- // iOS Button Sizes
- // --------------------------------------------------
-
- .button-large-ios {
- height: $button-ios-large-height;
-
- font-size: $button-ios-large-font-size;
-
- @include deprecated-variable(padding, $button-ios-large-padding) {
- @include padding($button-ios-large-padding-top, $button-ios-large-padding-end, $button-ios-large-padding-bottom, $button-ios-large-padding-start);
- }
- }
-
- .button-small-ios {
- height: $button-ios-small-height;
-
- font-size: $button-ios-small-font-size;
-
- @include deprecated-variable(padding, $button-ios-small-padding) {
- @include padding($button-ios-small-padding-top, $button-ios-small-padding-end, $button-ios-small-padding-bottom, $button-ios-small-padding-start);
- }
- }
-
- .button-small-ios[icon-only] ion-icon {
- font-size: $button-ios-small-icon-font-size;
- }
-
- // iOS Block Button
- // --------------------------------------------------
-
- .button-block-ios {
- @include margin-horizontal(0);
- }
-
- // iOS Full Button
- // --------------------------------------------------
-
- .button-full-ios {
- @include margin-horizontal(0);
- @include border-radius(0);
-
- border-right-width: 0;
- border-left-width: 0;
- }
-
- // iOS Outline Button
- // --------------------------------------------------
-
- .button-outline-ios {
- @include border-radius($button-ios-outline-border-radius);
-
- border-width: $button-ios-outline-border-width;
- border-style: $button-ios-outline-border-style;
- border-color: $button-ios-outline-border-color;
- color: $button-ios-outline-text-color;
- background-color: $button-ios-outline-background-color;
- }
-
- .button-outline-ios.activated {
- color: $button-ios-outline-text-color-activated;
- background-color: $button-ios-outline-background-color-activated;
- opacity: $button-ios-outline-opacity-activated;
- }
-
- // iOS Outline Button Color Mixin
- // --------------------------------------------------
-
- @mixin ios-button-outline($color-name, $color-base, $color-contrast) {
-
- .button-outline-ios-#{$color-name} {
- border-color: $color-base;
- color: $color-base;
- background-color: $button-ios-outline-background-color;
- }
-
- .button-outline-ios-#{$color-name}.activated {
- color: $color-contrast;
- background-color: $color-base;
- }
-
- }
-
-
- // iOS Clear Button
- // --------------------------------------------------
-
- .button-clear-ios {
- border-color: $button-ios-clear-border-color;
- color: $button-ios-background-color;
- background-color: $button-ios-clear-background-color;
- }
-
- .button-clear-ios.activated {
- background-color: $button-ios-clear-background-color-activated;
- opacity: $button-ios-clear-opacity-activated;
- }
-
- .button-clear-ios:hover:not(.disable-hover) {
- color: $button-ios-clear-text-color-hover;
- opacity: $button-ios-clear-opacity-hover;
- }
-
-
- // iOS Clear Button Color Mixin
- // --------------------------------------------------
-
- @mixin ios-button-clear($color-name, $color-base, $color-contrast) {
- $fg-color: $color-base;
-
- .button-clear-ios-#{$color-name} {
- border-color: $button-ios-clear-border-color;
- color: $fg-color;
- background-color: $button-ios-clear-background-color;
- }
-
- .button-clear-ios-#{$color-name}.activated {
- opacity: $button-ios-clear-opacity-activated;
- }
-
- .button-clear-ios-#{$color-name}:hover:not(.disable-hover) {
- color: $fg-color;
- }
- }
-
-
- // iOS Round Button
- // --------------------------------------------------
-
- .button-round-ios {
- @include border-radius($button-ios-round-border-radius);
-
- @include deprecated-variable(padding, $button-ios-round-padding) {
- @include padding($button-ios-round-padding-top, $button-ios-round-padding-end, $button-ios-round-padding-bottom, $button-ios-round-padding-start);
- }
- }
-
-
- // Generate iOS Button Colors
- // --------------------------------------------------
-
- @each $color-name, $color-base, $color-contrast in get-colors($colors-ios) {
- @include ios-button-default($color-name, $color-base, $color-contrast);
- @include ios-button-outline($color-name, $color-base, $color-contrast);
- @include ios-button-clear($color-name, $color-base, $color-contrast);
- }
-
-
- // iOS strong Button
- // --------------------------------------------------
-
- .button-strong-ios {
- font-weight: $button-ios-strong-font-weight;
- }
|