Skip to content

Conversation

@denysfedorov
Copy link
Contributor

@denysfedorov denysfedorov commented Jan 20, 2026

Fixed Link component with Icon stretching to full width inside flex containers

  • align-self: flex-start - prevents cross-axis stretching in flex containers;
  • width: max-content - ensures width is constrained to content size;
Before (stretched to the full width) image
After (content sized) image

Closes: https://github.com/dequelabs/walnut/issues/13196

Copilot AI review requested due to automatic review settings January 20, 2026 11:51
@denysfedorov denysfedorov requested a review from a team as a code owner January 20, 2026 11:51
@denysfedorov denysfedorov self-assigned this Jan 20, 2026
Copy link
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 a layout issue where Link components containing Icons were stretching to fill the full width of their parent flex containers. The fix applies CSS properties to constrain the Link to its content size and prevent unwanted cross-axis stretching.

Changes:

  • Added width: max-content to constrain Link width to content size
  • Added align-self: flex-start to prevent stretching in flex containers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2205.d15792l1n26ww3.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants