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

Checkboxes squish when their parent container's width shrinks #539

Closed
benvillalobos opened this issue Feb 9, 2024 · 1 comment · Fixed by #544
Closed

Checkboxes squish when their parent container's width shrinks #539

benvillalobos opened this issue Feb 9, 2024 · 1 comment · Fixed by #544
Assignees
Labels
bug Something isn't working

Comments

@benvillalobos
Copy link
Member

Describe the bug

We have an extension in VSCode called "Visual Studio Code for Education". In our VSCode extension's webview, when a checkbox's div shrinks in width, the width of the checkbox also shrinks in width.

To reproduce

  1. https://vscodeedu.com (account is free, just need a msft account)
  2. https://vscodeedu.com/courses/intro-to-python -> Start Course
  3. On the left hand side Table of Contents, navigate to
    4. Unit 3 - If
    5. Lesson 4 - If Statement Patterns
    6. "And vs Nested If"
    7. Scroll down
    8. Verify by expanding the right file over the left

Expected behavior

Checkboxes should retain their dimension

Current behavior

Checkboxes width's shrink as their containing div's width shrinks.

Screenshots

Notice how the checkboxes on the left squish as I reduce the width of our webview. checkboxes

Desktop (please complete the following information):

  • OS Version: Windows 11 22621.3007
  • Toolkit Version: 1.4.0

Additional context

The element containing these checkboxes are vscode-checkbox, and the checked-indicator seems to be the checkbox itself. Both of these come from the toolkit.

image

We've been able to work around this by adding this to our main App.scss

vscode-checkbox::part(checked-indicator) {
    min-width: 16px;
}
@benvillalobos benvillalobos added the bug Something isn't working label Feb 9, 2024
@hawkticehurst
Copy link
Member

Thanks for the heads up @benvillalobos! I'll definitely add this to backlog to look into and fix

chryw pushed a commit to chryw/vscode-webview-ui-toolkit that referenced this issue Mar 7, 2024
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants