dnbexperience / eufemia

DNB Design System
https://eufemia.dnb.no
Other
53 stars 32 forks source link

Code inside Blockquote renders with too low contrast #3730

Open boyum opened 5 months ago

boyum commented 5 months ago

🐛 Bug Report

When inserting a Code component inside a Blockquote component (often seen in developer documentation), the Blockquote font color overrides the Code's font color. The contrast between the Code's background and the font color is 1.34.

image

To Reproduce

<Blockquote>
  <Code>display</Code> and <Code>background-color</Code> are CSS
  properties
</Blockquote>

See this CodeSandbox

Expected behavior

Code should have the same color as it usually has (--color-black-80).

Eufemia Version

Browser JS: 10.37.0

Browser CSS: 10.37.0

Node.js: 10.37.0

boyum commented 5 months ago

The reason behind this is that the code element has color: inherit. If you can point me in a direction as to how you'd like it to be done, I could have a grab at this myself.