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

When showing validation messages the individual inputs shift up causing unsightly missalignment #4333

Open
Bond-Addict opened this issue Jun 26, 2024 · 7 comments
Labels
BUG Something isn't working

Comments

@Bond-Addict
Copy link
Contributor

@Bond-Addict Bond-Addict added the BUG Something isn't working label Jun 26, 2024
@m0ksem
Copy link
Collaborator

m0ksem commented Jul 8, 2024

Faced this issue today.

As a solution, I've added mt-4 to VaButton, so it is correctly aligned with all inputs. The only issue I'd like to fix is to remove margin-bottom from outer label, so label height correctly aligns with Tailwind mt-4.

@Bond-Addict
Copy link
Contributor Author

So mt-4 should be applied to all of my inputs?

@m0ksem
Copy link
Collaborator

m0ksem commented Jul 8, 2024

So mt-4 should be applied to all of my inputs?

To elements without label.

Here is example

mt-4 is not enough, exactly for 2px margin of label... I think this pattern solves most of the issues.
I manually removed margin in my project:

.va-input-wrapper__label--outer {
  margin-bottom: 0;
}

@Bond-Addict
Copy link
Contributor Author

I would venture to say its more common for inputs to have a label whether inside or out of the field. Do you have a recommendation for using a label? I think this is a common usecase. Would it not make sense to have a global style by default or a built in vuestic config value that could be used?

@m0ksem
Copy link
Collaborator

m0ksem commented Jul 8, 2024

I'll remove extra margin in future versions.

You can set globally inner-label props now via global config.

I don't have any recommendations, at least for now.

@Bond-Addict
Copy link
Contributor Author

@m0ksem hey there! I haven't been using the library super recently. Just curious if this was implemented yet 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants