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

Problem with parents inheriting vh value #15

Open
kaleidografik opened this issue Jan 12, 2021 · 3 comments
Open

Problem with parents inheriting vh value #15

kaleidografik opened this issue Jan 12, 2021 · 3 comments

Comments

@kaleidografik
Copy link

Hi @Faisal-Manzer - love the plugin and have been using it for a while, but have discovered an irritating bug.

In the below code, .form-field is oddly inheriting the min-height value from the nested child, which obviously it shouldn't do this. Is there a know bug or conflict with this?

Thanks

.form-field {
    width: 100%;

    // Textarea
    &.textarea {

      // Input
      textarea {
          min-height: 25vh;
      }
}
@Faisal-Manzer
Copy link
Owner

What is expected output and current output?

@kaleidografik
Copy link
Author

Sorry for the slow reply, this issue has just cropped up again.

The expected output would be (and this does happen):

.form-field.textarea textarea {
    min-height: 25vh;
    min-height: calc(var(--vh, 1vh) * 25);
 }

But additionally, the parent(s) inherit the value too:

.form-field {
    min-height: calc(var(--vh, 1vh) * 25);
}

.form-field.textarea {
    min-height: calc(var(--vh, 1vh) * 25);
}

My SASS markup is as follows (I'm using Tailwindcss, hence the @apply statement):

.form-field {

    // Textarea
    &.textarea {

      // Input
      textarea {
        @apply min-h-1/4;
      }
    }
}

Hope this helps

@kaleidografik
Copy link
Author

Was there ever a resolution to this @Faisal-Manzer ?

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