Skip to content

Elevation token does not work for dark mode #4125

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

Open
1 of 7 tasks
andre-bartak opened this issue Apr 29, 2025 · 5 comments
Open
1 of 7 tasks

Elevation token does not work for dark mode #4125

andre-bartak opened this issue Apr 29, 2025 · 5 comments
Labels

Comments

@andre-bartak
Copy link

andre-bartak commented Apr 29, 2025

Which generators are impacted?

  • All
  • HTML
  • React
  • Angular
  • Vue
  • Web components
  • Power Apps

Reproduction case

The --db-elevation tokens (like e.g. --db-elevation-md) seems to have a fixed dark color for the shadow.
In dark mode this shadow is not visible and the elevation does not work.

Compare to e.g. the shadow defined for .db-drawer .db-drawer-container:
https://design-system.deutschebahn.com/core-web/version/v2.0.4/components/layout/drawer/overview

Expected Behaviour

The elevation effect should be available in dark mode

Screenshots

No response

Browser version

None

Add any other context about the problem here.

No response

@nmerget
Copy link
Collaborator

nmerget commented May 14, 2025

@andre-bartak We don't provide a shadow for dark-mode, because it would look like a glow effect. Every component should have an additional border to seperate the content from other elements. Maybe @leape can answer this in detail

@leape
Copy link
Contributor

leape commented May 15, 2025

@andre-bartak We don't provide a shadow for dark-mode, because it would look like a glow effect. Every component should have an additional border to seperate the content from other elements. Maybe @leape can answer this in detail

You've already summarized it well, Nico.
We work with an additional border in the popover, for example, to ensure separation from the layer behind it.

@nmerget in the drawer, however, the border is missing, i.e. we absolutely have to add it!

@andre-bartak
Copy link
Author

andre-bartak commented May 15, 2025

Thanks for the feedback @nmerget @leape

A border would not work well with my use case. I use the elevation on cards for selected elements.
Image

@leape
Copy link
Contributor

leape commented May 15, 2025

@andre-bartak But you also use the checkbox, right? So the elevation is not the only indicator for the selection if I understand it correctly. From this perspective, the indicator for the selected card would be there for dark mode.

@andre-bartak
Copy link
Author

andre-bartak commented May 15, 2025

You are right @leape , the elevation just enhances the selection which is already indicated by the checkbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants