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

nimble-anchor is wider than the native anchor in its shadow DOM #1508

Closed
Tracked by #1288
m-akinc opened this issue Sep 8, 2023 · 0 comments · Fixed by #1532
Closed
Tracked by #1288

nimble-anchor is wider than the native anchor in its shadow DOM #1508

m-akinc opened this issue Sep 8, 2023 · 0 comments · Fixed by #1532
Assignees
Labels
bug Something isn't working

Comments

@m-akinc
Copy link
Contributor

m-akinc commented Sep 8, 2023

🐛 Bug Report

The nimble-anchor element's width includes some extra space on one or both of its sides, compared to the bounds of the native a element in the shadow root.
image
image

💻 Repro or Code Sample

Examine any nimble-anchor e.g. in Storybook.

🤔 Expected Behavior

Bounds of the nimble-anchor should be the same as the inner a element.

😯 Current Behavior

There is some kind of "padding" on one or both sides.

🔦 Context

Noticed when reviewing the link support in the rich-text editor.

@m-akinc m-akinc added bug Something isn't working triage New issue that needs to be reviewed labels Sep 8, 2023
@m-akinc m-akinc removed the triage New issue that needs to be reviewed label Sep 12, 2023
@m-akinc m-akinc self-assigned this Sep 13, 2023
m-akinc added a commit that referenced this issue Sep 14, 2023
## 🤨 Rationale

Fixes #1508

## 👩‍💻 Implementation

The issue is that whitespace inside the template was being rendered.

Inlined `startSlotTemplate` so that we could remove whitespace internal
to it. (We had previously done the same thing to the `endSlotTemplate`
for the same reason.) Removed all other whitespace in the template that
was causing a problem.

## 🧪 Testing

Tested in Storybook. Created a new Chromatic test.

## ✅ Checklist

- [x] I have updated the project documentation to reflect my changes or
determined no changes are needed.
@m-akinc m-akinc moved this from In progress to Done in Nimble Design System Priorities Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

1 participant