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

Custom styles for "tooltip-container" #165

Open
neznayer opened this issue Mar 23, 2023 · 1 comment
Open

Custom styles for "tooltip-container" #165

neznayer opened this issue Mar 23, 2023 · 1 comment

Comments

@neznayer
Copy link

neznayer commented Mar 23, 2023

Describe the bug
Couldn't add custom styles to tooltip-container with tailwind. The styles is always reset to some default ones. In this particular case - border-radius is not 16px, but 3px even though I set rounded-[16px] after tooltip-container.

To Reproduce
Steps to reproduce the behavior:

{visible && (
                <div
                    ref={setTooltipRef}
                    {...getTooltipProps({
                        className:
                            'tooltip-container rounded-[16px]'
                    })}
                >
                    <div
                        {...getArrowProps({
                            className: 'tooltip-arrow',
                        })}
                    />
                    <h3 className='text-color-main'>{col}</h3>
                    <div className='font-normal text-left w-full h-full'>
                        {children}
                    </div>
                </div>
            )}

Expected behavior
tooltip-container to have styles I defined by Tailwind.

@denisborovikov
Copy link
Collaborator

denisborovikov commented Mar 23, 2023

I expect the issue to be in the order of the CSS files. Tailwind CSS needs to be imported after the tooltip CSS. Otherwise, the last one is applied if styles have the same specificity.

.rounded-[16px]{
  border-radius: 16px
}

.tooltip-container {
  border-radius: 3px
}

// 3px

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

No branches or pull requests

2 participants