Teradata / covalent

Teradata UI Platform built on Angular Material
https://teradata.github.io/covalent/
MIT License
2.23k stars 359 forks source link

feat(components): updating theme mixin and styling updates #2126

Closed owilliams320 closed 4 months ago

owilliams320 commented 5 months ago

Description

Various styling and theming adjustments and fixes to the web components packages.

What's included?

Example below to show usage of using components theme with tokens and covalent icons

@use '@covalent/tokens' as covalent-tokens;
@use '@covalent/components' as covalent-theme;
@use '@covalent/icons';

$theme-tokens: map-get(covalent-tokens.$tokens, 'theme');
$light-tokens: map-get($theme-tokens, 'light');
$dark-tokens: map-get($theme-tokens, 'dark');
$light-colors: map-get($light-tokens, 'colors');
$dark-colors: map-get($dark-tokens, 'colors');
// Merge new tokens with deprecated tokens
$light-colors: map-merge($light-colors, map-get(covalent-tokens.$tokens, light));
$dark-colors: map-merge($dark-colors, map-get(covalent-tokens.$tokens, dark));

:root {
  // Covalent web components theme
  @include covalent-theme.components-theme(
    $light-colors,
    map-get(covalent-tokens.$tokens, typography)
  );
}

.dark {
  // Bring in css variables for dark theme
  @include covalent-theme.components-theme($dark-colors);
}

If your project does not use SCSS, you can pull in one of our light or dark prebuilt css themes.

owilliams320 commented 4 months ago

:tada: This PR is included in version 8.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: