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

CSS fallback is not properly formatted #123

Closed
blackfalcon opened this issue Dec 9, 2024 · 0 comments · Fixed by #124
Closed

CSS fallback is not properly formatted #123

blackfalcon opened this issue Dec 9, 2024 · 0 comments · Fixed by #124
Assignees
Labels
auro-badge Type: Bug Bug or Bug fixes

Comments

@blackfalcon
Copy link
Member

Please verify the version of auro-badge you have installed

@latest

Please describe the bug

While assisting a developer working on installing the auro-badge component it was discovered that the CSS variable fallbacks are incorrectly written in Sass causing the incorrect value to be output into CSS.

The code:

@each $status, $tierType, $fallback in $owstatus {
:host([#{$status}]) {
--ds-auro-badge-container-color: var(--ds-color-tier-#{$tierType}-#{$status}, $fallback);
--ds-auro-badge-border-color: var(--ds-color-tier-#{$tierType}-#{$status}, $fallback);
}
}

The output in the inspector:
Screenshot 2024-12-09 at 10 48 38 AM

Reproducing the error on the docsite

This issue is reproducible on the Auro docsite

Expected behavior

The Sass should be updated so that the $fallback variable is transformed into the desired hex value for the CSS.

What browsers are you seeing the problem on?

Chrome

Additional context

When constructing a CSS variable using Sass, it is important to remember that interpolation is currently required. E.g.

[auro-icon] {
  --ds-auro-icon-size: var(--ds-size-300, #{$ds-size-300});
}

Exit criteria

This issue can be closed once the areas that require interpolation have been addressed and the correct fallback value is reflected in the CSS versus the Sass variable reference.

@blackfalcon blackfalcon added Type: Bug Bug or Bug fixes auro-badge labels Dec 9, 2024
@blackfalcon blackfalcon self-assigned this Dec 9, 2024
blackfalcon added a commit that referenced this issue Dec 9, 2024
This commit updates all the incorrect Sass variable injections that
require interpolation.

On branch dsande/fallback
Your branch is up to date with 'origin/dsande/fallback'.
Changes to be committed:
modified:   src/color.scss
modified:   src/style.scss
@blackfalcon blackfalcon linked a pull request Dec 9, 2024 that will close this issue
6 tasks
blackfalcon added a commit that referenced this issue Dec 17, 2024
This commit updates all the incorrect Sass variable injections that
require interpolation.

On branch dsande/fallback
Your branch is up to date with 'origin/dsande/fallback'.
Changes to be committed:
modified:   src/color.scss
modified:   src/style.scss
blackfalcon pushed a commit that referenced this issue Dec 17, 2024
## [3.3.1](v3.3.0...v3.3.1) (2024-12-17)

### Bug Fixes

* update incorrect Sass var injections [#123](#123) ([05649e8](05649e8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auro-badge Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants