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

fix: #2625 Fix input spin button position #2777

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

Nekxio
Copy link
Contributor

@Nekxio Nekxio commented Jan 20, 2024

No description provided.

@saadeghi saadeghi self-assigned this Jan 21, 2024
Copy link
Owner

@saadeghi saadeghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't fix the issue. The margin is already 0
Something like this can fix it:

.input[type="number"]::-webkit-inner-spin-button,
.input-md[type="number"]::-webkit-inner-spin-button{
  @apply -my-4 -me-4;
}
.input-xs[type="number"]::-webkit-inner-spin-button{
  @apply -my-1 -me-2;
}
.input-sm[type="number"]::-webkit-inner-spin-button{
  @apply my-0 -me-3;
}
.input-lg[type="number"]::-webkit-inner-spin-button{
  @apply -my-6 -me-6;
}

The negative margin covers the padding. Also each size has different paddings.

@Nekxio
Copy link
Contributor Author

Nekxio commented Jan 28, 2024

Indeed, your proposal works.
I've just changed the values of input-xs and input-sm to get the desired rendering.

@saadeghi saadeghi merged commit 4fb0a30 into saadeghi:master Feb 7, 2024
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

Successfully merging this pull request may close these issues.

2 participants