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(VTextField): hide v-input__details for underlined variant #18696

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

yuwu9145
Copy link
Member

@yuwu9145 yuwu9145 commented Nov 16, 2023

fixes #18671

Probably it's similar to comment regarding where is the right place for this logic.

VInput by default doesn't have padding for hint, while VTextField is the one that defines $text-field-details-padding-inline. So whether to show/hide hint should be moved to VTextField and keep VInput intact.

Description

Markup:

<template>
  <v-form>
    <v-container>
      <v-row>
        <v-col cols="12" sm="6">
          <v-text-field
            label="Your product or service"
            model-value="Grocery delivery"
            hint="For example, flowers or used cars"
          ></v-text-field>
        </v-col>

        <v-col cols="12" sm="6">
          <v-text-field
            label="Your landing page"
            hint="www.example.com/page"
            persistent-hint
          ></v-text-field>
        </v-col>

        <v-col cols="12" sm="6">
          <v-text-field
            label="Your product or service"
            model-value="Grocery delivery"
            hint="For example, flowers or used cars"
            variant="solo"
          ></v-text-field>
        </v-col>

        <v-col cols="12" sm="6">
          <v-text-field
            label="Your landing page"
            hint="www.example.com/page"
            persistent-hint
            variant="solo"
          ></v-text-field>
        </v-col>

        <v-col cols="12" sm="6">
          <v-text-field
            label="Your product or service"
            model-value="Grocery delivery"
            hint="For example, flowers or used cars"
            variant="outlined"
          ></v-text-field>
        </v-col>

        <v-col cols="12" sm="6">
          <v-text-field
            label="Your landing page"
            hint="www.example.com/page"
            persistent-hint
            variant="outlined"
          ></v-text-field>
        </v-col>
        <v-col cols="12" sm="6">
          <v-text-field
            label="Your product or service"
            model-value="Grocery delivery"
            hint="For example, flowers or used cars"
            variant="underlined"
          ></v-text-field>
        </v-col>

        <v-col cols="12" sm="6">
          <v-text-field
            label="Your landing page"
            hint="www.example.com/page"
            persistent-hint
            variant="underlined"
          ></v-text-field>
        </v-col>
      </v-row>
    </v-container>
  </v-form>
</template>

@yuwu9145 yuwu9145 marked this pull request as ready for review November 16, 2023 03:42
@tawago
Copy link

tawago commented Nov 16, 2023

This is not just a problem of v-text-field tho. the solution should probably be on the VInput side? please see #18671 (comment)

@yuwu9145
Copy link
Member Author

yuwu9145 commented Nov 16, 2023

This is not just a problem of v-text-field tho. the solution should probably be on the VInput side? please see #18671 (comment)

No, select components are all using VTextField under the hood

@MajesticPotatoe MajesticPotatoe added T: bug Functionality that does not work as intended/expected C: VTextField VTextField labels Nov 16, 2023
@johnleider johnleider added this to the v3.4.x milestone Nov 16, 2023
@johnleider
Copy link
Member

I'm unable to reproduce this bug on master. Is this a production build CSS ordering issue?

@yuwu9145
Copy link
Member Author

yuwu9145 commented Nov 16, 2023

Yes, it does appear in playground and the problematic css is there

image

But, on master .v-input--plain-underlined .v-input__details { padding: 0} wins the priority so it doesn't show up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VTextField VTextField T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.4.0] TextField "underlined" hint is not aligned
4 participants