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

[Toggle] The parent container of the toggle with label has a fixed width which does not take the label’s width into consideration #7210

Closed
1 of 2 tasks
cheer021 opened this issue Nov 3, 2020 · 0 comments · Fixed by #8469
Labels

Comments

@cheer021
Copy link

cheer021 commented Nov 3, 2020

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you're having.

The parent container of the toggle with the label has a fixed width which does not take the label’s width into consideration.

Is this issue related to a specific component?

Toggle

What did you expect to happen? What happened instead? What would you like to
see changed?

In theory, the width of the container (bx---toggle--switch) is not correct which results in the container which holds the toggle label has a wrong width. The toggle label can be cut off.
Consumers can put a fixed width (eg. 3rem) to fix it but it would not work for the different locales for the same string

What browser are you working in?

Chrome v86 but this is a cross-browser issue

What version of the Carbon Design System are you using?

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?

IBM Cognos Analytics

Steps to reproduce the issue

  1. Go to the Carbon system page and find the Toggle component
  2. Inspect the element of bx--toggle--switch

Please create a reduced test case in CodeSandbox

Additional information

  • Screenshots or code
  • Notes

Screen Shot 2020-11-02 at 5 03 29 PM

Chatted with Carbon team on Slack: conversation is here https://ibm-analytics.slack.com/archives/C2K6RFJ1G/p1604362026377600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants