mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
feat(sass): add support for contrast in color map for wp mode
BREAKING CHANGE: Can now pass contrast to the colors map: ``` $colors-wp: ( primary: ( base: #327eff, contrast: yellow ), secondary: ( base: #32db64, contrast: hotpink ), danger: #d91e18, light: #f4f4f4, dark: #222 ) !default; ``` references #5445
This commit is contained in:
@ -63,15 +63,15 @@ ion-segment {
|
||||
// Windows Segment Button Mixin
|
||||
// --------------------------------------------------
|
||||
|
||||
@mixin wp-segment-button($color-name, $color-value) {
|
||||
@mixin wp-segment-button($color-name, $color-base) {
|
||||
|
||||
ion-segment[#{$color-name}] .segment-button {
|
||||
color: $color-value;
|
||||
color: $color-base;
|
||||
|
||||
&.activated,
|
||||
&.segment-activated {
|
||||
border-color: $color-value;
|
||||
color: $color-value;
|
||||
border-color: $color-base;
|
||||
color: $color-base;
|
||||
opacity: $segment-button-wp-opacity-activated;
|
||||
}
|
||||
}
|
||||
@ -82,6 +82,6 @@ ion-segment {
|
||||
// Windows Segment Color Generation
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $color-value in $colors-wp {
|
||||
@include wp-segment-button($color-name, $color-value);
|
||||
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
|
||||
@include wp-segment-button($color-name, $color-base);
|
||||
}
|
||||
|
Reference in New Issue
Block a user