Skip to content
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

bug(Stroked Button): white space between the opacity layer and the outline using the outlined-container-shape token #30484

Open
1 task
izubiaCocha opened this issue Feb 12, 2025 · 0 comments · May be fixed by #30513
Assignees
Labels
area: material/button P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@izubiaCocha
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I'm currently using a button-override with an outlined-container-shape set to 8px. It appears that the border-radius of the outline is smaller than that of the state's opacity layer. This is causing a white space to appear in the corners of the button, between the outline and the opacity layer.

Image

Reproduction

StackBlitz link: I'm having trouble with the "Installing dependencies" step
Steps to reproduce:

  1. angular cli 19.0.7
  2. ng new any-name
  3. ng add @angular/material (blue theme, sass)
  4. Add some mat-stroked-button
  5. html { @include mat.button-overrides((outlined-container-shape: 8px)); }

Expected Behavior

The opacity layer should fully cover the hole within the outline, in the hover, active and pressed states.

Actual Behavior

the opacity layer is smaller, leaving visible white gaps.

Environment

  • Angular: 19.0.6
  • CDK/Material: 19.0.5
  • Browser(s): chrome /safari
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS
@izubiaCocha izubiaCocha added the needs triage This issue needs to be triaged by the team label Feb 12, 2025
@crisbeto crisbeto self-assigned this Feb 18, 2025
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/button and removed needs triage This issue needs to be triaged by the team labels Feb 18, 2025
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 18, 2025
…der radius is customized

Fixes that the focus overlay on outlined buttons wasn't covering the outlined button fully when its border radius is customized.

Fixes angular#30484.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/button P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
2 participants