refactor(sass): tweaks to the alpha css variables (#14223)

* alpha tweaks

* added alpha-input
cleanup for theme-builder

* removed global variables

* style(searchbar): fix indentation

closes #14196
This commit is contained in:
Ross Gerbasi
2018-03-30 09:27:58 -05:00
committed by Brandy Carney
parent 7887550166
commit 6c6f867ce4
39 changed files with 729 additions and 695 deletions

View File

@ -140,7 +140,7 @@ button[disabled],
$color-base: ion-color($colors-ios, $color-name, base, ios);
$color-contrast: ion-color($colors-ios, $color-name, contrast, ios);
$color-tint: ion-color($colors-ios, $color-name, shade, ios);
$bg-color-focused: ion-color($colors-ios, $color-name, base, ios, $alpha-ios-focused);
$bg-color-focused: ion-color($colors-ios, $color-name, base, ios, $button-ios-outline-background-color-alpha-focused);
.button-outline-ios-#{$color-name} {
border-color: $color-base;
@ -193,7 +193,7 @@ button[disabled],
@mixin ios-button-clear($color-name) {
$fg-color: ion-color($colors-ios, $color-name, base, ios);
$bg-color-focused: ion-color($colors-ios, $color-name, base, ios, $alpha-ios-focused);
$bg-color-focused: ion-color($colors-ios, $color-name, base, ios, $button-ios-clear-background-color-alpha-focused);
.button-clear-ios-#{$color-name} {
border-color: $button-ios-clear-border-color;

View File

@ -4,192 +4,197 @@
// --------------------------------------------------
/// @prop - Font family of the button
$button-ios-font-family: $font-family-ios-base !default;
$button-ios-font-family: $font-family-ios-base !default;
/// @prop - Margin top of the button
$button-ios-margin-top: 4px !default;
$button-ios-margin-top: 4px !default;
/// @prop - Margin end of the button
$button-ios-margin-end: 2px !default;
$button-ios-margin-end: 2px !default;
/// @prop - Margin bottom of the button
$button-ios-margin-bottom: 4px !default;
$button-ios-margin-bottom: 4px !default;
/// @prop - Margin start of the button
$button-ios-margin-start: 2px !default;
$button-ios-margin-start: 2px !default;
/// @prop - Padding top of the button
$button-ios-padding-top: 0 !default;
$button-ios-padding-top: 0 !default;
/// @prop - Padding end of the button
$button-ios-padding-end: 1em !default;
$button-ios-padding-end: 1em !default;
/// @prop - Padding bottom of the button
$button-ios-padding-bottom: $button-ios-padding-top !default;
$button-ios-padding-bottom: $button-ios-padding-top !default;
/// @prop - Padding start of the button
$button-ios-padding-start: $button-ios-padding-end !default;
$button-ios-padding-start: $button-ios-padding-end !default;
/// @prop - Height of the button
$button-ios-height: 2.8em !default;
$button-ios-height: 2.8em !default;
/// @prop - Border radius of the button
$button-ios-border-radius: 8px !default;
$button-ios-border-radius: 8px !default;
/// @prop - Font size of the button text
$button-ios-font-size: 16px !default;
$button-ios-font-size: 16px !default;
/// @prop - Font weight of the button text
$button-ios-font-weight: 500 !default;
$button-ios-font-weight: 500 !default;
/// @prop - Letter spacing of the button text
$button-ios-letter-spacing: -.03em !default;
$button-ios-letter-spacing: -.03em !default;
/// @prop - Background color of the button
$button-ios-background-color: ion-color($colors-ios, primary, base, ios) !default;
$button-ios-background-color: ion-color($colors-ios, primary, base, ios) !default;
/// @prop - Text color of the button
$button-ios-text-color: ion-color($colors-ios, $button-ios-background-color, contrast, ios) !default;
$button-ios-text-color: ion-color($colors-ios, $button-ios-background-color, contrast, ios) !default;
/// @prop - Background color of the activated button
$button-ios-background-color-activated: ion-color($colors-ios, $button-ios-background-color, shade, ios) !default;
$button-ios-background-color-activated: ion-color($colors-ios, $button-ios-background-color, shade, ios) !default;
/// @prop - Opacity of the activated button
$button-ios-opacity-activated: 1 !default;
$button-ios-opacity-activated: 1 !default;
/// @prop - Opacity of the button on hover
$button-ios-opacity-hover: .8 !default;
$button-ios-opacity-hover: .8 !default;
/// @prop - Background color of the focused button
$button-ios-background-color-focused: ion-color($colors-ios, $button-ios-background-color, shade, ios) !default;
$button-ios-background-color-focused: ion-color($colors-ios, $button-ios-background-color, shade, ios) !default;
/// @prop - Opacity of the button when disabled
$button-ios-opacity-disabled: $alpha-ios-disabled !default;
$button-ios-opacity-disabled: $button-opacity-disabled !default;
// iOS Large Button
// --------------------------------------------------
/// @prop - Padding top of the large button
$button-ios-large-padding-top: 0 !default;
$button-ios-large-padding-top: 0 !default;
/// @prop - Padding end of the large button
$button-ios-large-padding-end: 1em !default;
$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;
$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;
$button-ios-large-padding-start: $button-ios-large-padding-end !default;
/// @prop - Height of the large button
$button-ios-large-height: 2.8em !default;
$button-ios-large-height: 2.8em !default;
/// @prop - Font size of the large button
$button-ios-large-font-size: 20px !default;
$button-ios-large-font-size: 20px !default;
// iOS Small Button
// --------------------------------------------------
/// @prop - Padding top of the small button
$button-ios-small-padding-top: 0 !default;
$button-ios-small-padding-top: 0 !default;
/// @prop - Padding end of the small button
$button-ios-small-padding-end: .9em !default;
$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;
$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;
$button-ios-small-padding-start: $button-ios-small-padding-end !default;
/// @prop - Height of the small button
$button-ios-small-height: 2.1em !default;
$button-ios-small-height: 2.1em !default;
/// @prop - Font size of the small button
$button-ios-small-font-size: 13px !default;
$button-ios-small-font-size: 13px !default;
// iOS Outline Button
// --------------------------------------------------
/// @prop - Border width of the outline button
$button-ios-outline-border-width: 1px !default;
$button-ios-outline-border-width: 1px !default;
/// @prop - Border style of the outline button
$button-ios-outline-border-style: solid !default;
$button-ios-outline-border-style: solid !default;
/// @prop - Border radius of the outline button
$button-ios-outline-border-radius: $button-ios-border-radius !default;
$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;
$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;
$button-ios-outline-text-color: $button-ios-background-color !default;
/// @prop - Background color of the outline button
$button-ios-outline-background-color: transparent !default;
$button-ios-outline-background-color: transparent !default;
/// @prop - Text color of the activated outline button
$button-ios-outline-text-color-activated: ion-color($colors-ios, $button-ios-background-color, contrast, ios) !default;
$button-ios-outline-text-color-activated: ion-color($colors-ios, $button-ios-background-color, contrast, ios) !default;
/// @prop - Background color of the activated outline button
$button-ios-outline-background-color-activated: $button-ios-background-color !default;
$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;
$button-ios-outline-opacity-activated: 1 !default;
/// @prop - Background color alpha of the focused outline button
$button-ios-outline-background-color-alpha-focused: .25 !default;
/// @prop - Background color of the focused outline button
$button-ios-outline-background-color-focused: ion-color($colors-ios, primary, base, ios, $alpha-ios-focused) !default;
$button-ios-outline-background-color-focused: ion-color($colors-ios, primary, base, ios, $button-ios-outline-background-color-alpha-focused) !default;
// iOS Clear Button
// --------------------------------------------------
/// @prop - Border color of the clear button
$button-ios-clear-border-color: transparent !default;
$button-ios-clear-border-color: transparent !default;
/// @prop - Background color of the clear button
$button-ios-clear-background-color: transparent !default;
$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;
$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;
$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;
$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;
$button-ios-clear-opacity-hover: .6 !default;
/// @prop - Background color alpha of the focused clear button
$button-ios-clear-background-color-alpha-focused: .25 !default;
/// @prop - Background color of the focused clear button
$button-ios-clear-background-color-focused: ion-color($colors-ios, primary, base, ios, $alpha-ios-focused) !default;
$button-ios-clear-background-color-focused: ion-color($colors-ios, primary, base, ios, $button-ios-clear-background-color-alpha-focused) !default;
// iOS Round Button
// --------------------------------------------------
/// @prop - Padding top of the round button
$button-ios-round-padding-top: $button-round-padding-top !default;
$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;
$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;
$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;
$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;
$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;
$button-ios-strong-font-weight: 600 !default;

View File

@ -158,7 +158,7 @@ button[disabled],
@mixin md-button-outline($color-name) {
$fg-color: ion-color($colors-md, $color-name, tint, md);
$bg-color-focused: ion-color($colors-md, $color-name, base, md, $alpha-md-focused);
$bg-color-focused: ion-color($colors-md, $color-name, base, md, $button-md-outline-background-color-alpha-focused);
.button-outline-md-#{$color-name} {
border-color: $fg-color;
@ -218,7 +218,7 @@ button[disabled],
@mixin md-button-clear($color-name) {
$fg-color: ion-color($colors-md, $color-name, base, md);
$bg-color-focused: ion-color($colors-md, $color-name, base, md, $alpha-md-focused);
$bg-color-focused: ion-color($colors-md, $color-name, base, md, $button-md-clear-background-color-alpha-focused);
.button-clear-md-#{$color-name} {
border-color: $button-md-clear-border-color;

View File

@ -4,222 +4,235 @@
// --------------------------------------------------
/// @prop - Font family of the button
$button-md-font-family: $font-family-md-base !default;
$button-md-font-family: $font-family-md-base !default;
/// @prop - Margin top of the button
$button-md-margin-top: 4px !default;
$button-md-margin-top: 4px !default;
/// @prop - Margin end of the button
$button-md-margin-end: 2px !default;
$button-md-margin-end: 2px !default;
/// @prop - Margin bottom of the button
$button-md-margin-bottom: 4px !default;
$button-md-margin-bottom: 4px !default;
/// @prop - Margin start of the button
$button-md-margin-start: 2px !default;
$button-md-margin-start: 2px !default;
/// @prop - Padding top of the button
$button-md-padding-top: 0 !default;
$button-md-padding-top: 0 !default;
/// @prop - Padding end of the button
$button-md-padding-end: 1.1em !default;
$button-md-padding-end: 1.1em !default;
/// @prop - Padding bottom of the button
$button-md-padding-bottom: $button-md-padding-top !default;
$button-md-padding-bottom: $button-md-padding-top !default;
/// @prop - Padding start of the button
$button-md-padding-start: $button-md-padding-end !default;
$button-md-padding-start: $button-md-padding-end !default;
/// @prop - Height of the button
$button-md-height: 36px !default;
$button-md-height: 36px !default;
/// @prop - Border radius of the button
$button-md-border-radius: 2px !default;
$button-md-border-radius: 2px !default;
/// @prop - Font size of the button text
$button-md-font-size: 14px !default;
$button-md-font-size: 14px !default;
/// @prop - Font weight of the button text
$button-md-font-weight: 500 !default;
$button-md-font-weight: 500 !default;
/// @prop - Capitalization of the button text
$button-md-text-transform: uppercase !default;
$button-md-text-transform: uppercase !default;
/// @prop - Background color of the button
$button-md-background-color: ion-color($colors-md, primary, base, md) !default;
$button-md-background-color: ion-color($colors-md, primary, base, md) !default;
/// @prop - Text color of the button
$button-md-text-color: ion-color($colors-md, $button-md-background-color, contrast, md) !default;
$button-md-text-color: ion-color($colors-md, $button-md-background-color, contrast, md) !default;
/// @prop - Box shadow of the button
$button-md-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12) !default;
$button-md-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12) !default;
/// @prop - Duration of the transition of the button
$button-md-transition-duration: 300ms !default;
$button-md-transition-duration: 300ms !default;
/// @prop - Speed curve of the transition of the button
$button-md-transition-timing-function: cubic-bezier(.4, 0, .2, 1) !default;
$button-md-transition-timing-function: cubic-bezier(.4, 0, .2, 1) !default;
/// @prop - Background color of the button on hover
$button-md-background-color-hover: $button-md-background-color !default;
$button-md-background-color-hover: $button-md-background-color !default;
/// @prop - Background color of the activated button
$button-md-background-color-activated: ion-color($colors-md, $button-md-background-color, shade, md) !default;
$button-md-background-color-activated: ion-color($colors-md, $button-md-background-color, shade, md) !default;
/// @prop - Opacity of the activated button
$button-md-opacity-activated: 1 !default;
$button-md-opacity-activated: 1 !default;
/// @prop - Box shadow of the activated button
$button-md-box-shadow-activated: 0 3px 5px rgba(0, 0, 0, .14), 0 3px 5px rgba(0, 0, 0, .21) !default;
$button-md-box-shadow-activated: 0 3px 5px rgba(0, 0, 0, .14), 0 3px 5px rgba(0, 0, 0, .21) !default;
/// @prop - Background color of the ripple on the button
$button-md-ripple-background-color: $text-md-color-step-400 !default;
$button-md-ripple-background-color: $text-md-color-step-400 !default;
/// @prop - Background color of the focused button
$button-md-background-color-focused: ion-color($colors-md, $button-md-background-color, shade, md) !default;
$button-md-background-color-focused: ion-color($colors-md, $button-md-background-color, shade, md) !default;
/// @prop - Opacity of the button when disabled
$button-md-opacity-disabled: $alpha-md-disabled !default;
$button-md-opacity-disabled: $button-opacity-disabled !default;
// Material Design Large Button
// --------------------------------------------------
/// @prop - Padding top of the large button
$button-md-large-padding-top: 0 !default;
$button-md-large-padding-top: 0 !default;
/// @prop - Padding end of the large button
$button-md-large-padding-end: 1em !default;
$button-md-large-padding-end: 1em !default;
/// @prop - Padding bottom of the large button
$button-md-large-padding-bottom: $button-md-large-padding-top !default;
$button-md-large-padding-bottom: $button-md-large-padding-top !default;
/// @prop - Padding start of the large button
$button-md-large-padding-start: $button-md-large-padding-end !default;
$button-md-large-padding-start: $button-md-large-padding-end !default;
/// @prop - Height of the large button
$button-md-large-height: 2.8em !default;
$button-md-large-height: 2.8em !default;
/// @prop - Font size of the large button
$button-md-large-font-size: 20px !default;
$button-md-large-font-size: 20px !default;
// Material Design Small Button
// --------------------------------------------------
/// @prop - Padding top of the small button
$button-md-small-padding-top: 0 !default;
$button-md-small-padding-top: 0 !default;
/// @prop - Padding end of the small button
$button-md-small-padding-end: .9em !default;
$button-md-small-padding-end: .9em !default;
/// @prop - Padding bottom of the small button
$button-md-small-padding-bottom: $button-md-small-padding-top !default;
$button-md-small-padding-bottom: $button-md-small-padding-top !default;
/// @prop - Padding start of the small button
$button-md-small-padding-start: $button-md-small-padding-end !default;
$button-md-small-padding-start: $button-md-small-padding-end !default;
/// @prop - Height of the small button
$button-md-small-height: 2.1em !default;
$button-md-small-height: 2.1em !default;
/// @prop - Font size of the small button
$button-md-small-font-size: 13px !default;
$button-md-small-font-size: 13px !default;
// Material Design Outline Button
// --------------------------------------------------
/// @prop - Border width of the outline button
$button-md-outline-border-width: 1px !default;
$button-md-outline-border-width: 1px !default;
/// @prop - Border style of the outline button
$button-md-outline-border-style: solid !default;
$button-md-outline-border-style: solid !default;
/// @prop - Border color of the outline button
$button-md-outline-border-color: $button-md-background-color !default;
$button-md-outline-border-color: $button-md-background-color !default;
/// @prop - Text color of the outline button
$button-md-outline-text-color: $button-md-background-color !default;
$button-md-outline-text-color: $button-md-background-color !default;
/// @prop - Background color of the outline button
$button-md-outline-background-color: transparent !default;
$button-md-outline-background-color: transparent !default;
/// @prop - Box shadow of the outline button
$button-md-outline-box-shadow: none !default;
$button-md-outline-box-shadow: none !default;
/// @prop - Background color alpha of the outline button on hover
$button-md-outline-background-color-alpha-hover: .1 !default;
/// @prop - Background color of the outline button on hover
$button-md-outline-background-color-hover: css-var($text-md-color-value, text-md-color, $alpha-md-hover) !default;
$button-md-outline-background-color-hover: css-var($text-md-color-value, text-md-color, $button-md-outline-background-color-alpha-hover) !default;
/// @prop - Background color of the activated outline button
$button-md-outline-background-color-activated: transparent !default;
$button-md-outline-background-color-activated: transparent !default;
/// @prop - Box shadow of the activated outline button
$button-md-outline-box-shadow-activated: none !default;
$button-md-outline-box-shadow-activated: none !default;
/// @prop - Opacity of the activated outline button
$button-md-outline-opacity-activated: 1 !default;
$button-md-outline-opacity-activated: 1 !default;
/// @prop - Background color of the ripple on the outline button
$button-md-outline-ripple-background-color: $button-md-background-color !default;
$button-md-outline-ripple-background-color: $button-md-background-color !default;
/// @prop - Background color alpha of the focused outline button
$button-md-outline-background-color-alpha-focused: .1 !default;
/// @prop - Background color of the focused outline button
$button-md-outline-background-color-focused: ion-color($colors-md, primary, base, md, $alpha-md-focused) !default;
$button-md-outline-background-color-focused: ion-color($colors-md, primary, base, md, $button-md-outline-background-color-alpha-focused) !default;
// Material Design Clear Button
// --------------------------------------------------
/// @prop - Border color of the clear button
$button-md-clear-border-color: transparent !default;
$button-md-clear-border-color: transparent !default;
/// @prop - Text color of the clear button
$button-md-clear-text-color: $button-md-background-color !default;
$button-md-clear-text-color: $button-md-background-color !default;
/// @prop - Background color of the clear button
$button-md-clear-background-color: transparent !default;
$button-md-clear-background-color: transparent !default;
/// @prop - Box shadow of the clear button
$button-md-clear-box-shadow: none !default;
$button-md-clear-box-shadow: none !default;
/// @prop - Opacity of the clear button
$button-md-clear-opacity: 1 !default;
$button-md-clear-opacity: 1 !default;
/// @prop - Background color alpha of the activated clear button
$button-md-clear-background-color-alpha-activated: .1 !default;
/// @prop - Background color of the activated clear button
$button-md-clear-background-color-activated: css-var($text-md-color-value, text-md-color, $alpha-md-activated) !default;
$button-md-clear-background-color-activated: css-var($text-md-color-value, text-md-color, $button-md-clear-background-color-alpha-activated) !default;
/// @prop - Box shadow of the activated clear button
$button-md-clear-box-shadow-activated: $button-md-clear-box-shadow !default;
$button-md-clear-box-shadow-activated: $button-md-clear-box-shadow !default;
/// @prop - Background color alpha of the clear button on hover
$button-md-clear-background-color-alpha-hover: .1 !default;
/// @prop - Background color of the clear button on hover
$button-md-clear-background-color-hover: css-var($text-md-color-value, text-md-color, $alpha-md-hover) !default;
$button-md-clear-background-color-hover: css-var($text-md-color-value, text-md-color, $button-md-clear-background-color-alpha-hover) !default;
/// @prop - Background color of the ripple on the clear button
$button-md-clear-ripple-background-color: $text-md-color-step-600 !default;
$button-md-clear-ripple-background-color: $text-md-color-step-600 !default;
/// @props - Background color of the focused clear button
$button-md-clear-background-color-focused: ion-color($colors-md, primary, base, md, $alpha-md-focused) !default;
$button-md-clear-background-color-alpha-focused: .1 !default;
/// @props - Background color of the focused clear button
$button-md-clear-background-color-focused: ion-color($colors-md, primary, base, md, $button-md-clear-background-color-alpha-focused) !default;
// Material Design Round Button
// --------------------------------------------------
/// @prop - Padding top of the round button
$button-md-round-padding-top: $button-round-padding-top !default;
$button-md-round-padding-top: $button-round-padding-top !default;
/// @prop - Padding end of the round button
$button-md-round-padding-end: $button-round-padding-end !default;
$button-md-round-padding-end: $button-round-padding-end !default;
/// @prop - Padding bottom of the round button
$button-md-round-padding-bottom: $button-round-padding-bottom !default;
$button-md-round-padding-bottom: $button-round-padding-bottom !default;
/// @prop - Padding start of the round button
$button-md-round-padding-start: $button-round-padding-start !default;
$button-md-round-padding-start: $button-round-padding-start !default;
/// @prop - Border radius of the round button
$button-md-round-border-radius: $button-round-border-radius !default;
$button-md-round-border-radius: $button-round-border-radius !default;
// Material Design Decorator Button
// --------------------------------------------------
/// @prop - Font weight of the strong button
$button-md-strong-font-weight: bold !default;
$button-md-strong-font-weight: bold !default;

View File

@ -17,3 +17,6 @@ $button-round-padding-start: $button-round-padding-end !default;
/// @prop - Border radius of the round button
$button-round-border-radius: 64px !default;
/// @prop - Opacity of the button when disabled
$button-opacity-disabled: .5 !default;