Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ai-gradient): ensure strings are returned as color tokens #15695

Merged
merged 6 commits into from
Feb 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(ai-gradient): ensure strings are returned as color tokens
  • Loading branch information
tw15egan committed Feb 5, 2024
commit fb036496294379a60d27a348229ba9dd511c77e2
7 changes: 3 additions & 4 deletions packages/styles/scss/utilities/_ai-gradient.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

@use '../theme';
@use './custom-property';

/// Experimental - name and structure subject to change. Use at your own risk!
/// Adds AI gradient styles to a component
Expand Down Expand Up @@ -43,7 +44,7 @@
/// @example @include callout-gradient();
/// @param {String} $type - Type of gradient, either 'default', 'selected' or 'hover'
/// @param {Number} $offset - specify a pixel offset the callout should start from the bottom
/// @param {String} $background - specify if the background should be `layer` or `background`
/// @param {String} $background - specify the token to be used as the background
/// @group utilities
@mixin callout-gradient(
$type: 'default',
Expand All @@ -55,9 +56,7 @@
$start: calc(0% + #{$offset});
}

@if $background == 'layer' {
$background: theme.$layer;
}
$background: custom-property.get-var($background, theme.$background);

@if $type == 'hover' {
background: linear-gradient(
Expand Down
Loading