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

Adding custom style property to status-badge works only when property is not defined for the selected severity #178

Open
ceisipeik opened this issue Sep 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ceisipeik
Copy link
Contributor

ceisipeik commented Sep 9, 2023

What happened?

Tried adding a custom border-color for the status-badge component with a warning serverity. Custom border-color was overwritten by the warning severity's border-color defined in the statusBadgeCustomPropertyGroups.

Custom border-color could be added for the status-badge with a info severity, because border-color is not defined for the info severity in the statusBadgeCustomPropertyGroups.

Reproduction steps

Could be reproduced in the angular sandbox app (ria).

Add status-badge with the warning severity and add a red border:

<cvi-ng-status-badge
    style="--border-color: red"
    [severity]="'warning'"
    [label]="'warn'"
></cvi-ng-status-badge>

Border stays yellow.

Add status-badge with the info severity and add a red border:

<cvi-ng-status-badge
    style="--border-color: red"
    [severity]="'info'"
    [label]="'info'"
></cvi-ng-status-badge>

Border is changed to red.

Package

Angular

Version

1.31.1

@ceisipeik ceisipeik added the bug Something isn't working label Sep 9, 2023
@certainlyakey
Copy link
Contributor

Thanks, confirmed. Ideally we should refactor the use of CSS variables inside of the Sass component in such a way that a variable used outside to apply a custom color should be renamed and scoped appropriately (eg --cvi-status-badge--border-color).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants