question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Button]: cannot use icon-only button without importing all styles

See original GitHub issue

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you’re having. When trying to use the icon-only button component by only importing the carbon-components/scss/components/button/button styles, the tooltip positioning is wrong. When also importing carbon-components/scss/components/tooltip/tooltip, the tooltip position is correct but is always visible without the triangle. The triangle is added on hover and focus.

Is this issue related to a specific component? Button

What browser are you working in? Chrome 79

What version of the Carbon Design System are you using?

  • carbon-components@10.9.3
  • carbon-components-react@7.9.3

Steps to reproduce the issue

See https://codesandbox.io/s/musing-wave-spqu0 as a reference. Also try removing the tooltip style import in styles.scss.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
emyarodcommented, Feb 10, 2020

it looks like css-helpers is not being imported (missing .bx--assistive-text class)

1reaction
asudohcommented, Feb 6, 2020

@emyarod Would you be interested in taking a look at this…? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Buttons - Material Design
Buttons allow users to take actions with a single tap.
Read more >
MaterialButton style does not support only Icon #272 - GitHub
With the use of style Widget.MaterialComponents.Button.Icon I was expecting the layout to format according to icon only but it works just ...
Read more >
I want to style the Button Component with some properties but ...
I think styled is now a new way in MUI to create make and use custom styles. I don't think I can use...
Read more >
IconButton class - material library - Flutter - Dart API docs
An icon button is a picture printed on a Material widget that reacts to touches by filling with color (ink). Icon buttons are...
Read more >
Button - UI5 Web Components - SAP
The ui5-button exposes the following CSS Shadow Parts: button - Used to style the native button element. ES6 Module Import. import "@ui5/webcomponents/dist/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found