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

style(Card): fix default background color token #3331

Merged
merged 4 commits into from
Mar 10, 2025
Merged

style(Card): fix default background color token #3331

merged 4 commits into from
Mar 10, 2025

Conversation

mimarz
Copy link
Collaborator

@mimarz mimarz commented Mar 7, 2025

fixes #3334

Copy link

changeset-bot bot commented Mar 7, 2025

🦋 Changeset detected

Latest commit: 53ab9b9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@digdir/designsystemet-css Patch
@digdir/designsystemet Patch
@digdir/designsystemet-theme Patch
@digdir/designsystemet-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mimarz mimarz marked this pull request as ready for review March 7, 2025 12:05
Copy link
Contributor

github-actions bot commented Mar 7, 2025

Preview deployments for this pull request:

Storybook - 10. Mar 2025 - 11:12

Copy link
Contributor

github-actions bot commented Mar 7, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 48.55% 3250 / 6694
🔵 Statements 48.55% 3250 / 6694
🔵 Functions 82.69% 215 / 260
🔵 Branches 77.6% 558 / 719
File CoverageNo changed files found.
Generated in workflow #2418 for commit 53ab9b9 by the Vitest Coverage Report Action

@@ -27,7 +27,7 @@
text-align: inherit;

&[data-variant='default'] {
--dsc-card-background: var(--ds-color-background-default);
--dsc-card-background: var(--ds-color-surface-default);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need &[data-variant='default'] { at all when the tokens are the same? I think this is a remainder from the time where we did not have "tinted"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not best practice to just have both? Without, data-variant="default" will not be selected and just default to default variable for --dsc-card-background.

Hmm this reminds me, what happens if users manually overrides --dsc-card-background and enables data-variant, I guess it wont work due to layers and specificity 🤔

Copy link
Collaborator Author

@mimarz mimarz Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a short huddle and decided to make a separate issue on superflous selectors.

@mimarz mimarz merged commit 91e4126 into next Mar 10, 2025
10 checks passed
@mimarz mimarz deleted the fix-card branch March 10, 2025 12:09
@github-actions github-actions bot mentioned this pull request Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Card default background color token
2 participants