Skip to content

fix: add missing @property --db-screen-lg and update related CSS va…#6459

Open
nmerget wants to merge 1 commit intomainfrom
fix-missing-screen-property
Open

fix: add missing @property --db-screen-lg and update related CSS va…#6459
nmerget wants to merge 1 commit intomainfrom
fix-missing-screen-property

Conversation

@nmerget
Copy link
Copy Markdown
Collaborator

@nmerget nmerget commented Apr 9, 2026

…riables

Proposed changes

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/fix-missing-screen-property

@github-project-automation github-project-automation bot moved this to 🏗 In progress in UX Engineering Team Backlog Apr 9, 2026
@nmerget nmerget moved this from 🏗 In progress to 🎁 Ready for review in UX Engineering Team Backlog Apr 9, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

🦋 Changeset detected

Latest commit: 592ad36

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

This PR includes changesets to release 10 packages
Name Type
@db-ux/core-foundations Patch
@db-ux/core-components Patch
@db-ux/ngx-core-components Patch
@db-ux/react-core-components Patch
@db-ux/wc-core-components Patch
@db-ux/v-core-components Patch
@db-ux/core-stylelint Patch
@db-ux/core-migration Patch
@db-ux/agent-cli Patch
@db-ux/core-eslint-plugin 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

@github-actions github-actions bot added 📕documentation Improvements or additions to documentation 🏗foundations labels Apr 9, 2026
@mfranzke mfranzke requested a review from Copilot April 12, 2026 11:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an inconsistency in the foundations screen-size tokens by registering the missing @property --db-screen-lg, and adjusts the Tailwind v4 theme variable mappings for breakpoints and container sizes.

Changes:

  • Register --db-screen-lg via @property so it has a typed definition and initial value like the other screen tokens.
  • Move Tailwind breakpoint definitions from hardcoded values to var(--db-screen-*) mappings in the Tailwind theme dimensions file.
  • Add Tailwind --container-* theme variables mapped to --db-container-* tokens, plus a patch changeset entry.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/foundations/tailwind/theme/revert-theme.css Removes hardcoded Tailwind breakpoint values from the “revert” theme block.
packages/foundations/tailwind/theme/dimensions.css Adds Tailwind breakpoint mappings and introduces --container-* variables mapped to DB container tokens.
packages/foundations/scss/_screen-sizes.scss Adds the missing @property --db-screen-lg registration with an initial value.
.changeset/free-papers-boil.md Adds a patch changeset documenting the fix.

Comment on lines +35 to +39
--breakpoint-xs: var(--db-screen-xs);
--breakpoint-sm: var(--db-screen-sm);
--breakpoint-md: var(--db-screen-md);
--breakpoint-lg: var(--db-screen-lg);
--breakpoint-xl: var(--db-screen-xl);
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

--breakpoint-* theme values are used by Tailwind to generate responsive variants (e.g. sm:) via media queries. Setting them to var(--db-screen-*) risks Tailwind emitting @media (min-width: var(--db-screen-sm)), which is invalid because var() is not allowed in media queries. It also changes the actual breakpoint values vs the existing Tailwind v3 config (tailwind-tokens.json uses xs=360px, sm=720px, …). Prefer keeping literal lengths for --breakpoint-* here (and ensure they match the configured Tailwind screens) while still using --db-screen-* for spacing/sizing variables where var() is valid.

Suggested change
--breakpoint-xs: var(--db-screen-xs);
--breakpoint-sm: var(--db-screen-sm);
--breakpoint-md: var(--db-screen-md);
--breakpoint-lg: var(--db-screen-lg);
--breakpoint-xl: var(--db-screen-xl);
--breakpoint-xs: 360px;
--breakpoint-sm: 720px;
--breakpoint-md: 1024px;
--breakpoint-lg: 1280px;
--breakpoint-xl: 1440px;

Copilot uses AI. Check for mistakes.
@mfranzke mfranzke moved this from 🎁 Ready for review to 🎶 Waiting for feedback in UX Engineering Team Backlog Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📕documentation Improvements or additions to documentation 🏗foundations

Projects

Status: 🎶 Waiting for feedback

Development

Successfully merging this pull request may close these issues.

3 participants