Skip to content

feat(semantic-tokens): update shadow token styles#14152

Draft
matgalla wants to merge 11 commits intodevfrom
matgalla/10050-update-shadow-tokens
Draft

feat(semantic-tokens): update shadow token styles#14152
matgalla wants to merge 11 commits intodevfrom
matgalla/10050-update-shadow-tokens

Conversation

@matgalla
Copy link
Copy Markdown
Contributor

@matgalla matgalla commented Mar 24, 2026

Related Issue: #10050

Summary

  • updates the design tokens build process to enable light/dark mode switching within shadows

Semantic color token additions:

  • adds color.shadow.1
    • light mode: rgba({core.color.neutral.blk-240}, {core.opacity.4})
    • dark mode: rgba({core.color.neutral.blk-240}, {core.opacity.12})
  • adds color.shadow.2
    • light mode: rgba({core.color.neutral.blk-240}, {core.opacity.8})
    • dark mode: rgba({core.color.neutral.blk-240}, {core.opacity.12})
  • adds color.shadow.3
    • light mode: rgba({core.color.neutral.blk-240}, {core.opacity.10})
    • dark mode: rgba({core.color.neutral.blk-240}, {core.opacity.16})

Semantic shadow token updates:

  • updates semantic.color.shadow.sm
    • shadow 1:
      • "x": "{core.size.default.none}",
      • "y": "{core.size.default.2}",
      • "blur": "{core.size.default.8}",
      • "spread": "{core.size.default.none}",
      • "color": "{semantic.color.shadow.3}"
    • shadow 2:
      • "x": "{core.size.default.none}",
      • "y": "{core.size.default.2}",
      • "blur": "{core.size.default.8}",
      • "spread": "{core.size.default.none}",
      • "color": "{semantic.color.shadow.1}"
  • updates semantic.color.shadow.md
    • shadow 1:
      • "x": "{core.size.default.none}",
      • "y": "{core.size.default.6}",
      • "blur": "{core.size.default.20}",
      • "spread": "-{core.size.default.4}",
      • "color": "{semantic.color.shadow.3}"
    • shadow 2:
      • "x": "{core.size.default.none}",
      • "y": "{core.size.default.4}",
      • "blur": "{core.size.default.12}",
      • "spread": "-{core.size.default.2}",
      • "color": "{semantic.color.shadow.2}"

Semantic shadow token refactors:

  • refactors semantic.color.shadow.none
    • "x": "{core.size.default.none}",
    • "y": "{core.size.default.none}",
    • "blur": "{core.size.default.none}",
    • "spread": "{core.size.default.none}",
    • "color": "rgba({core.color.neutral.blk-240}, {core.opacity.0})"

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Mar 24, 2026
@matgalla matgalla added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Mar 24, 2026
--calcite-opacity-dark: 0.85;
--calcite-opacity-full: 1;
--calcite-shadow-none: 0 0 0 0 rgba(0, 0, 0, 0);
--calcite-shadow-sm: 0 2px 8px 0 rgba(0, 0, 0, 0.1), 0 2px 8px 0 rgba(0, 0, 0, 0.04);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is where we'd want this line to be:
--calcite-shadow-sm: 0 2px 8px 0 var(--calcite-color-shadow-3), 0 2px 8px 0 var(--calcite-color-shadow-1);

--calcite-opacity-full: 1;
--calcite-shadow-none: 0 0 0 0 rgba(0, 0, 0, 0);
--calcite-shadow-sm: 0 2px 8px 0 rgba(0, 0, 0, 0.1), 0 2px 8px 0 rgba(0, 0, 0, 0.04);
--calcite-shadow-md: 0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is where we'd want this line to be:
--calcite-shadow-md: 0 6px 20px -4px var(--calcite-color-shadow-3), 0 4px 12px -2px var(--calcite-color-shadow-2);

@matgalla
Copy link
Copy Markdown
Contributor Author

@jcfranco, I created a fresh PR. This is the ideal way that things would be set up in our src tokens. I also ran test snapshots just to show what it would look like before any changes. See above comments for details

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Apr 3, 2026
@matgalla matgalla removed the Stale Issues or pull requests that have not had recent activity. label Apr 3, 2026
@matgalla matgalla removed the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Issues tied to a new feature or request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants