Skip to content

Remove overflow: hidden from border-radius utility classes#710

Open
selamw1 wants to merge 1 commit intogoogle:mainfrom
selamw1:fix/lit-renderer-text-clipping
Open

Remove overflow: hidden from border-radius utility classes#710
selamw1 wants to merge 1 commit intogoogle:mainfrom
selamw1:fix/lit-renderer-text-clipping

Conversation

@selamw1
Copy link
Contributor

@selamw1 selamw1 commented Feb 24, 2026

It fixes issue #208

This PR resolves an issue where text elements using the Lit renderer were unexpectedly clipped when rendered with rounded corners.

The border-br-* utility classes in @a2ui/web_core (which handle border-radius) were indiscriminately applying overflow: hidden. This caused clipping for content like line-height ascenders/descenders in text blocks.

This commit removes the overflow: hidden rule from the border-radius class generator, fixing the clipping while maintaining the intended rounded corners.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the overflow: hidden property from the border-radius utility classes to fix a text clipping issue. The change is logical, but it lacks corresponding tests. As per the repository's style guide, all code changes should be tested. I've added a comment to highlight the need for a test case to prevent future regressions.


.border-ow-${idx} { outline-width: ${idx}px; }
.border-br-${idx} { border-radius: ${idx * grid}px; overflow: hidden;}`;
.border-br-${idx} { border-radius: ${idx * grid}px; }`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Per the repository style guide, code changes should include tests. To prevent this text clipping issue from recurring, please consider adding a test case (e.g., a visual regression test) that verifies this fix.

References
  1. The repository style guide states: 'If there are code changes, code should have tests.' (link)

@ava-cassiopeia
Copy link
Collaborator

I think you'll need to revert your changes to the package-lock file to get the checks to pass.

@selamw1 selamw1 force-pushed the fix/lit-renderer-text-clipping branch from 830f700 to 011f5eb Compare February 25, 2026 18:41
@selamw1
Copy link
Contributor Author

selamw1 commented Feb 25, 2026

Done, reverted the lock file and squashed all changes into one commit.

Copy link
Collaborator

@ava-cassiopeia ava-cassiopeia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for cleaning that up!

Copy link
Collaborator

@ava-cassiopeia ava-cassiopeia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looks like there's one merge conflict to resolve, and then I think this is good to merge.

Copy link
Collaborator

@ava-cassiopeia ava-cassiopeia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looks like there's one merge conflict to resolve, and then I think this is good to merge.

Copy link
Collaborator

@ava-cassiopeia ava-cassiopeia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looks like there's one merge conflict to resolve, and then I think this is good to merge.

@selamw1 selamw1 requested a review from yjbanov as a code owner March 3, 2026 19:06
@selamw1
Copy link
Contributor Author

selamw1 commented Mar 3, 2026

Thanks, conflict resolved.

Copy link
Collaborator

@ava-cassiopeia ava-cassiopeia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh weird GitHub sent my request for changes multiple times, sorry about that!

Anyway, it looks like there's a check failing, it might be a build order-of-operations issue from first glance.

@selamw1 selamw1 force-pushed the fix/lit-renderer-text-clipping branch from cd584f5 to d07bff1 Compare March 4, 2026 19:37
@selamw1
Copy link
Contributor Author

selamw1 commented Mar 4, 2026

CI failure fixed.

@selamw1 selamw1 force-pushed the fix/lit-renderer-text-clipping branch from d07bff1 to 3019ecf Compare March 4, 2026 21:38
@selamw1
Copy link
Contributor Author

selamw1 commented Mar 4, 2026

Adjusted the test script to use find and xargs to fix the globbing issues in the CI runner. Tests are discovering and passing locally now.

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants