-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Tooltip]: Class for caret for viewport awareness #542
Comments
@aledavila is there any way you can include this in your Tooltip PR for the v2 version of the tooltips? I'm thinking it can be fixed by adding a span before the tooltip content like this:
And then instead of using |
@marijohannessen yup I’ll give that a try. Thanks |
Great to see the question raised and thoughts put on this problem space! My $0.02 is that elimination of pseudo element here may lead to request for eliminating (eventually) all similar pseudo elements usage due to style override-ability. I guess another way to address this problem is defining a Sass mix-in where consuming application use as the default. |
Did you end up including this in your PR @aledavila? |
Ah this is what I missed I couldn’t find this issue after it was brought up. I did make the tooltip a don element so it’s just adding the caret to it instead of as ::after. I’ll do it @joshblack |
Fixed in #714 |
Viewport awareness requires DOM element
In order for tooltips to support view port awareness the ::before element that is used for the caret needs to be an actual DOM element. Since Carbon uses the pseudo element, we have no way to access the styles for that portion of the tooltip and had to copy and paste from the source code (not ideal for long term). Can you add a class for the caret so WHDS can inherit the styles? Look at:
https://github.ibm.com/Watson-Health/design-system/blob/develop/src/components/tooltip/index.scss
The text was updated successfully, but these errors were encountered: