material-web icon indicating copy to clipboard operation
material-web copied to clipboard

Dialog header is bold when it shouldn't be

Open dylan904 opened this issue 2 years ago • 2 comments

What is affected?

Component

Description

When using the dialog component, it's always seen to have a bold header. However, if you look at the Figma file, or in the MD3 components overview you can see the font weight should be normal, not bold.

Reproduction

Confirm the bold header in their demo here.

Workaround

There seems to be no workaround at the moment, even if I try to use the following, it somehow applies "normal" to the computed styles, but still renders as bold. I'm guessing something to do with the shadow DOM.

slot[name="headline"]::slotted(*) { font-weight: normal; }

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

Failed in 1.3.0 and 1.4.0

Browser/OS/Node environment

Browser: Chrome 122.0.6261.129 (Official Build) Node: 20.3.1 NPM: 9.6.7 Mac OS: 11.6

dylan904 avatar Mar 23 '24 23:03 dylan904

In Chrome on macOS for me, when I inspect the dialog's title, its font weight is 400, the same as normal.

Can you provide a screenshot with what you're seeing in the devtools?

One spot I see that could be a problem is that we're applying the headline's font to the <h2>'s parent, so the <h2>'s font-weight may be overriding it in some use cases.

asyncliz avatar Mar 25 '24 17:03 asyncliz

Let us know if you're still seeing this issue. If so, post a screenshot and we can re-open.

asyncliz avatar Apr 07 '24 19:04 asyncliz