Skip to content

InlineNotification text color is not displaying properly with CSS custom properties enabled #8257

Answered by tw15egan
tw15egan asked this question in Help
Discussion options

You must be logged in to vote

Based on an update in #7808, Notifications use the component-token approach. If you are enabling CSS custom properties, you will need to import the theme and component-token files before your component imports, like so:

$feature-flags: (
  enable-css-custom-properties: true,
);

@import '~carbon-components/scss/globals/scss/theme';
@import '~carbon-components/scss/globals/scss/component-tokens';

@import '~carbon-components/src/components/tag/tag';
@import '~carbon-components/src/components/notification/notification';

:root {
  @include carbon--theme($carbon--theme--g100, true) {
    @include emit-component-tokens($tag-colors);
    @include emit-component-tokens($notification-colors);
  }
}

Replies: 1 comment

Comment options

tw15egan
Mar 31, 2021
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by tw15egan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant