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

No space between hoo-label and hoo-input-text #149

Open
gabbsmo opened this issue Jul 3, 2024 · 1 comment
Open

No space between hoo-label and hoo-input-text #149

gabbsmo opened this issue Jul 3, 2024 · 1 comment

Comments

@gabbsmo
Copy link

gabbsmo commented Jul 3, 2024

Describe the bug
I noticed that there was some vertical padding on hoo-label, but when used with the <label> tag at least, that padding will overlap a input element below it.

To Reproduce
Steps to reproduce the behavior:

<label class="hoo-label">foobar</label>
<input type="text" class="hoo-input-text" />

Expected behavior
I guess the padding around the label was supposed to put some distance between it and surrounding elements.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 126

Additional context
My workaround:

.hoo-label {
  display: block;
}

Not sure if block is the best choice but it works. There are better CSS wizards in this project than me. And as always, just let me know if the current behaviour is by design.

@gabbsmo
Copy link
Author

gabbsmo commented Aug 15, 2024

Some more context. In my project I also added width: 100%; to labels, because even if you make inputs full width, iOS Safari will ignore that. This way I ensure that the input is always below the label and do not float up beside it.

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

1 participant