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(vfield): standardize descendants to fix spacing #16132
fix(vfield): standardize descendants to fix spacing #16132
Conversation
Standardized the sizing and spacing of VInput-VField descendants to fix multiple bugs relating to field resizing and text alignment. All field densities are now identical sizes across all variants. This required changing the size of VChip elements inside a VField. fix vuetifyjs#15980, fix vuetifyjs#16048, fix vuetifyjs#15948
b75c264
to
e99b484
Compare
Whoops--accidentally deleted something I shouldn't in my final cleanup. I'll have the fix up shortly. |
e6199a3
to
c4ab550
Compare
Can you clarify the issue? The only difference I see is that next has inconsistent sizing, and mine doesn't. From looking at constants and defaults in next, it looks like the larger size (42/48/56px) should be the correct one, and that's the size that allows enough room for field elements. |
The label is too close to the top of the input and looks offset improperly. The label should be closer to the input text: |
Lowered floating labels slightly to match original spacing
Got it, thanks for the clarification. Should be fixed now. |
$field-control-density: ('default': 0, 'comfortable': -1, 'compact': -2) !default; | ||
$field-chips-margin-top: ('default': 1, 'comfortable': 0, 'compact': 0) !default; | ||
$field-chips-margin-bottom: ('default': 3, 'comfortable': 3, 'compact': 2) !default; | ||
$field-chip-height: 20px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$field-chip-height: 20px; | |
$field-chip-height: 20px !default; |
@@ -209,7 +209,7 @@ export const VSelect = genericComponent<new < | |||
'v-select', | |||
{ | |||
'v-select--active-menu': menu.value, | |||
'v-select--chips': !!props.chips, | |||
// 'v-select--chips': !!props.chips, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 'v-select--chips': !!props.chips, |
@at-root | ||
@include tools.density('v-input', $field-control-density) using ($modifier) | ||
--v-field-prepend-append-padding-top: #{$field-control-padding-top + $modifier} | ||
// --v-field-padding-bottom: #{$field-control-padding-bottom + $modifier} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// --v-field-padding-bottom: #{$field-control-padding-bottom + $modifier} |
@@ -213,8 +250,14 @@ | |||
|
|||
.v-field--error:not(.v-field--disabled) & | |||
color: rgb(var(--v-theme-error)) | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// --v-field-padding-bottom: #{$field-control-padding-bottom + $modifier} | ||
--v-field-padding-top: #{$field-control-padding-top + $modifier} | ||
--v-field-padding-bottom: #{$field-control-padding-bottom + $modifier} | ||
&.v-textarea .v-field:not(.v-field--no-label) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to avoid using :not()
where possible because it can increase specificity a lot and make it hard to follow what rules are being applied
7c417af
to
070e2aa
Compare
7ce7b02
to
1adfeaa
Compare
bb07313
to
e5c1c07
Compare
7cd11a6
to
d0765f1
Compare
f931c2e
to
748056c
Compare
cd170f8
to
98e57dc
Compare
Description
Standardized the sizing and spacing of VInput-VField descendants to fix multiple bugs relating to
field resizing and text alignment. All field variants now have identical sizing whether they contain input or not.
This required changing the size of VChip elements inside a VField. Fixes #15980, #16048, and #15948
Motivation and Context
Fixes #15980, #16048, and #15948, as well as several other unreported spacing and resizing issues. Fields should no longer resize on input, and cursors and text will stay in one position regardless of field state.
How Has This Been Tested?
Comprehensive visual testing (see markup below).
Duplicated in Codepen link to compare with current version: https://codepen.io/kelliedlynch/pen/qBKXBPN
Markup:
Types of changes
Checklist:
master
for bug fixes and documentation updates,dev
for new features and backwards compatible changes andnext
for non-backwards compatible changes).