|
| 1 | +@import "../../globals.wp"; |
| 2 | +@import "./segment"; |
| 3 | + |
| 4 | +// Windows Segment |
| 5 | +// -------------------------------------------------- |
| 6 | + |
| 7 | +$segment-button-wp-text-color-activated: $toolbar-wp-text-color !default; |
| 8 | + |
| 9 | +$segment-button-wp-padding: 0 6px !default; |
| 10 | +$segment-button-wp-height: 4.0rem !default; |
| 11 | +$segment-button-wp-line-height: 4.0rem !default; |
| 12 | +$segment-button-wp-font-size: 1.3rem !default; |
| 13 | +$segment-button-wp-text-transform: uppercase !default; |
| 14 | +$segment-button-wp-font-weight: bold !default; |
| 15 | +$segment-button-wp-icon-size: 2.6rem !default; |
| 16 | +$segment-button-wp-icon-line-height: $segment-button-wp-line-height !default; |
| 17 | +$segment-button-wp-background-color: transparent !default; |
| 18 | + |
| 19 | +$segment-button-wp-opacity: 0.7 !default; |
| 20 | +$segment-button-wp-opacity-activated: 1.0 !default; |
| 21 | + |
| 22 | +$segment-button-wp-buttons-justify-content: flex-start !default; |
| 23 | + |
| 24 | +ion-segment { |
| 25 | + justify-content: $segment-button-wp-buttons-justify-content; |
| 26 | +} |
| 27 | + |
| 28 | +.segment-button { |
| 29 | + padding: $segment-button-wp-padding; |
| 30 | + |
| 31 | + height: $segment-button-wp-height; |
| 32 | + line-height: $segment-button-wp-line-height; |
| 33 | + |
| 34 | + font-size: $segment-button-wp-font-size; |
| 35 | + text-transform: $segment-button-wp-text-transform; |
| 36 | + font-weight: $segment-button-wp-font-weight; |
| 37 | + |
| 38 | + opacity: $segment-button-wp-opacity; |
| 39 | + color: $segment-button-wp-text-color-activated; |
| 40 | + background-color: $segment-button-wp-background-color; |
| 41 | + |
| 42 | + ion-icon { |
| 43 | + font-size: $segment-button-wp-icon-size; |
| 44 | + line-height: $segment-button-wp-icon-line-height; |
| 45 | + } |
| 46 | +} |
| 47 | + |
| 48 | +.toolbar { |
| 49 | + |
| 50 | + ion-segment { |
| 51 | + margin: 0 auto; |
| 52 | + } |
| 53 | + |
| 54 | + .segment-button.activated, |
| 55 | + .segment-button.segment-activated { |
| 56 | + opacity: $segment-button-wp-opacity-activated; |
| 57 | + } |
| 58 | + |
| 59 | +} |
| 60 | + |
| 61 | + |
| 62 | +// Windows Segment Button Mixin |
| 63 | +// -------------------------------------------------- |
| 64 | + |
| 65 | +@mixin wp-segment-button($color-name, $color-value) { |
| 66 | + |
| 67 | + ion-segment[#{$color-name}] .segment-button { |
| 68 | + color: $color-value; |
| 69 | + |
| 70 | + &.activated, |
| 71 | + &.segment-activated { |
| 72 | + opacity: $segment-button-wp-opacity-activated; |
| 73 | + border-color: $color-value; |
| 74 | + color: $color-value; |
| 75 | + } |
| 76 | + } |
| 77 | + |
| 78 | +} |
| 79 | + |
| 80 | + |
| 81 | +// Windows Segment Color Generation |
| 82 | +// -------------------------------------------------- |
| 83 | + |
| 84 | +@each $color-name, $color-value in $colors-wp { |
| 85 | + @include wp-segment-button($color-name, $color-value); |
| 86 | +} |
0 commit comments