Skip to content

[Ionic v4] Changing --ion-color-base has no effect on ion-label #14829

@peterpeterparker

Description

@peterpeterparker

Ionic Info
@ionic/angular: "4.0.0-alpha.11"

Describe the Bug
Maybe I'm doing it wrongly but setting another --ion-color-base color in variable.scss doesn't seems to change the color of the ion-label

Respectively

:root {
   --ion-color-base: red;
 }

or

 :host {
   --ion-color-base: red;
 }

won't display text in red

Expected Behavior

ion-label once rendered get the following attributes

[data-ion-label-ios-host] {
       color: var(--ion-color-base);
       --ion-color-base: currentColor;
}

I would have expected, but again maybe I'm wrong

 [data-ion-label-ios-host] {
       color: var(--ion-color-base);
       --ion-color-base: red; // the color I defined in my variable.scss
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions