db-ui / mono

DB UX Design System Monorepo - Provides Design Tokens and components for Web UIs
https://db-ui.github.io/mono/review/main/
Apache License 2.0
35 stars 6 forks source link

Components that use body-font-size `md` falsely inherit font-sizes #2716

Open bruno-sch opened 1 week ago

bruno-sch commented 1 week ago

Which generators are impacted?

Reproduction case

Place components that use the default body-font-size md in a div container and give it a font-size class that differs from md, e.g. db-font-size-2xl.

If components do not use an explicitly set font-size, they inherit it. And this leads to unexpected behaviour. For example, spacing is then no longer in relation to font-sizes - in contrast to the use of densities.

According to the design, this behaviour is not desired. For this reason, the technical implementation should be consistent with the design.

Expected Behaviour

The font size of components should only be influenced by density classes set outside, not by font-size classes.

Screenshots

No response

Browser version

None

Add any other context about the problem here.

No response