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

Form tooltips don't use $tooltip variables #26816

Closed
bhrutledge opened this issue Jul 6, 2018 · 0 comments
Closed

Form tooltips don't use $tooltip variables #26816

bhrutledge opened this issue Jul 6, 2018 · 0 comments

Comments

@bhrutledge
Copy link

Instead, they use hard-coded values:

.#{$state}-tooltip {
position: absolute;
top: 100%;
z-index: 5;
display: none;
max-width: 100%; // Contain to parent when possible
padding: .5rem;
margin-top: .1rem;
font-size: .875rem;
line-height: 1;
color: $white;
background-color: rgba($color, .8);
border-radius: .2rem;
}

Here's what I did in my project to make them look more like the other tooltips:

@each $state, $bg-color in (valid: $form-feedback-valid-color, invalid: $form-feedback-invalid-color) {
    .#{$state}-tooltip {
        background-color: rgba($bg-color, $tooltip-opacity);
        border-radius: if($enable-rounded, $border-radius, 0);
        color: color-yiq($bg-color);
        line-height: $line-height-base;
        font-size: $tooltip-font-size;
        padding: $tooltip-padding-y $tooltip-padding-x;
        z-index: $zindex-tooltip;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants