| 1 |
// BTN API |
| 2 |
$button-font-weight: $eps-font-weight-medium; |
| 3 |
$button-line-height: 16px; |
| 4 |
$button-padding-y: 0.5em; |
| 5 |
$button-padding-x: 1.5em; |
| 6 |
$button-border-radius: $eps-radius; |
| 7 |
$button-hover-constant: 5%; |
| 8 |
$button-active-constant: 3%; |
| 9 |
// sizing |
| 10 |
// -- sm |
| 11 |
$button-sm-font-size: type(text,xs); |
| 12 |
$button-sm-line-height: 14px; |
| 13 |
// --lg |
| 14 |
$button-lg-font-size: type(text,lg); |
| 15 |
$button-lg-line-height: 18px; |
| 16 |
//Semantic Colors |
| 17 |
$button-primary-background-color: theme-colors(success); |
| 18 |
$button-primary-hover-background-color: darken($button-primary-background-color, $button-hover-constant); |
| 19 |
$button-primary-active-background-color: darken($button-primary-background-color, $button-active-constant); |
| 20 |
$button-primary-color: theme-colors(light); |
| 21 |
$button-secondary-background-color: tints(500); |
| 22 |
$button-secondary-hover-background-color: darken($button-secondary-background-color, $button-hover-constant); |
| 23 |
$button-secondary-active-background-color: darken($button-secondary-background-color, $button-active-constant); |
| 24 |
$button-secondary-color: theme-colors(light); |
| 25 |
$button-danger-background-color: theme-colors(danger); |
| 26 |
$button-danger-hover-background-color: darken($button-danger-background-color, $button-hover-constant); |
| 27 |
$button-danger-active-background-color: darken($button-danger-background-color, $button-active-constant); |
| 28 |
$button-danger-color: theme-colors(light); |
| 29 |
$button-cta-background-color: theme-colors(cta); |
| 30 |
$button-cta-hover-background-color: darken($button-cta-background-color, $button-hover-constant); |
| 31 |
$button-cta-active-background-color: darken($button-cta-background-color, $button-active-constant); |
| 32 |
$button-cta-color: theme-colors(light); |
| 33 |
$button-link-background-color: theme-elements-colors(link-color); |
| 34 |
$button-link-hover-background-color: darken($button-link-background-color, $button-hover-constant); |
| 35 |
$button-link-active-background-color: darken($button-link-background-color, $button-active-constant); |
| 36 |
$button-link-color: theme-colors(light); |
| 37 |
$button-disabled-background-color: theme-colors(disabled); |
| 38 |
$button-disabled-hover-background-color: darken($button-disabled-background-color, $button-hover-constant); |
| 39 |
$button-disabled-active-background-color: darken($button-disabled-background-color, $button-active-constant); |
| 40 |
$button-disabled-color: theme-colors(light); |
| 41 |
// -- dark |
| 42 |
$button-dark-primary-background-color: dark-theme-colors(success); |
| 43 |
$button-dark-primary-color: dark-theme-colors(light); |
| 44 |
$button-dark-primary-hover-background-color: darken($button-dark-primary-background-color, $button-hover-constant); |
| 45 |
$button-dark-primary-active-background-color: darken($button-dark-primary-background-color, $button-active-constant); |
| 46 |
$button-dark-secondary-background-color: dark-tints(200); |
| 47 |
$button-dark-secondary-hover-background-color: darken($button-dark-secondary-background-color, $button-hover-constant); |
| 48 |
$button-dark-secondary-active-background-color: darken($button-dark-secondary-background-color, $button-active-constant); |
| 49 |
$button-dark-secondary-color: dark-theme-colors(light); |
| 50 |
$button-dark-danger-background-color: dark-theme-colors(danger); |
| 51 |
$button-dark-danger-hover-background-color: darken($button-dark-danger-background-color, $button-hover-constant); |
| 52 |
$button-dark-danger-active-background-color: darken($button-dark-danger-background-color, $button-active-constant); |
| 53 |
$button-dark-danger-color: dark-theme-colors(light); |
| 54 |
$button-dark-cta-background-color: dark-theme-colors(cta); |
| 55 |
$button-dark-cta-hover-background-color: darken($button-dark-cta-background-color, $button-hover-constant); |
| 56 |
$button-dark-cta-active-background-color: darken($button-dark-cta-background-color, $button-active-constant); |
| 57 |
$button-dark-cta-color: dark-theme-colors(light); |
| 58 |
$button-dark-link-background-color: theme-elements-colors(link-color); |
| 59 |
$button-dark-link-hover-background-color: darken($button-dark-link-background-color, $button-hover-constant); |
| 60 |
$button-dark-link-active-background-color: darken($button-dark-link-background-color, $button-active-constant); |
| 61 |
$button-dark-link-color: theme-colors(light); |
| 62 |
$button-dark-disabled-background-color: dark-theme-colors(disabled); |
| 63 |
$button-dark-disabled-hover-background-color: darken($button-dark-disabled-background-color, $button-hover-constant); |
| 64 |
$button-dark-disabled-active-background-color: darken($button-dark-disabled-background-color, $button-active-constant); |
| 65 |
$button-dark-disabled-color: dark-theme-colors(light); |
| 66 |
|
| 67 |
// using mixing to transfer custom properties |
| 68 |
@mixin button-custom-properties() { |
| 69 |
--button-line-height: #{$button-line-height}; |
| 70 |
--button-padding-y: #{$button-padding-y}; |
| 71 |
--button-padding-x: #{$button-padding-x}; |
| 72 |
// primary |
| 73 |
--button-primary-background-color: #{$button-primary-background-color}; |
| 74 |
--button-primary-hover-background-color: #{$button-primary-hover-background-color}; |
| 75 |
--button-primary-active-background-color: #{$button-primary-active-background-color}; |
| 76 |
--button-primary-color: #{$button-primary-color}; |
| 77 |
// secondary |
| 78 |
--button-secondary-background-color: #{$button-secondary-background-color}; |
| 79 |
--button-secondary-hover-background-color: #{$button-secondary-hover-background-color}; |
| 80 |
--button-secondary-active-background-color: #{$button-secondary-active-background-color}; |
| 81 |
--button-secondary-color: #{$button-secondary-color}; |
| 82 |
// danger |
| 83 |
--button-danger-background-color: #{$button-danger-background-color}; |
| 84 |
--button-danger-hover-background-color: #{$button-danger-hover-background-color}; |
| 85 |
--button-danger-active-background-color: #{$button-danger-active-background-color}; |
| 86 |
--button-danger-color: #{$button-danger-color}; |
| 87 |
// cta |
| 88 |
--button-cta-background-color: #{$button-cta-background-color}; |
| 89 |
--button-cta-hover-background-color: #{$button-cta-hover-background-color}; |
| 90 |
--button-cta-active-background-color: #{$button-cta-active-background-color}; |
| 91 |
--button-cta-color: #{$button-cta-color}; |
| 92 |
// link |
| 93 |
--button-link-background-color: #{$button-link-background-color}; |
| 94 |
--button-link-hover-background-color: #{$button-link-hover-background-color}; |
| 95 |
--button-link-active-background-color: #{$button-link-active-background-color}; |
| 96 |
--button-link-color: #{$button-link-color}; |
| 97 |
// disabled |
| 98 |
--button-disabled-background-color: #{$button-disabled-background-color}; |
| 99 |
--button-disabled-hover-background-color: #{$button-disabled-hover-background-color}; |
| 100 |
--button-disabled-active-background-color: #{$button-disabled-active-background-color}; |
| 101 |
--button-disabled-color: #{$button-disabled-color}; |
| 102 |
} |
| 103 |
|
| 104 |
@mixin button-dark-custom-properties() { |
| 105 |
// primary |
| 106 |
--button-primary-background-color: #{$button-dark-primary-background-color}; |
| 107 |
--button-primary-color: #{$button-dark-primary-color}; |
| 108 |
--button-primary-hover-background-color: #{$button-dark-primary-hover-background-color}; |
| 109 |
--button-primary-active-background-color: #{$button-dark-primary-active-background-color}; |
| 110 |
// secondary |
| 111 |
--button-secondary-background-color: #{$button-dark-secondary-background-color}; |
| 112 |
--button-secondary-color: #{$button-dark-secondary-color}; |
| 113 |
--button-secondary-hover-background-color: #{$button-dark-secondary-hover-background-color}; |
| 114 |
--button-secondary-active-background-color: #{$button-dark-secondary-active-background-color}; |
| 115 |
// cta |
| 116 |
--button-cta-background-color: #{$button-dark-cta-background-color}; |
| 117 |
--button-cta-hover-background-color: #{$button-dark-cta-hover-background-color}; |
| 118 |
--button-cta-active-background-color: #{$button-dark-cta-active-background-color}; |
| 119 |
--button-cta-color: #{$button-dark-cta-color}; |
| 120 |
// link |
| 121 |
--button-link-background-color: #{$button-dark-link-background-color}; |
| 122 |
--button-link-hover-background-color: #{$button-dark-link-hover-background-color}; |
| 123 |
--button-link-active-background-color: #{$button-dark-link-active-background-color}; |
| 124 |
--button-link-color: #{$button-dark-link-color}; |
| 125 |
// disabled |
| 126 |
--button-disabled-background-color: #{$button-dark-disabled-background-color}; |
| 127 |
--button-disabled-hover-background-color: #{$button-dark-disabled-hover-background-color}; |
| 128 |
--button-disabled-active-background-color: #{$button-dark-disabled-active-background-color}; |
| 129 |
--button-disabled-color: #{$button-dark-disabled-color}; |
| 130 |
} |
| 131 |
|
| 132 |
|
| 133 |
|