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

feat(VField): support border prop #19819

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft

feat(VField): support border prop #19819

wants to merge 3 commits into from

Conversation

yuwu9145
Copy link
Member

@yuwu9145 yuwu9145 commented May 15, 2024

Description

When border prop applied, VField actually uses outlined variant under the hood but override outline styles with border styles

May-16-2024 14-19-32

Markup:

<template>
  <v-app>
    <v-container>
      <v-text-field
        border="md"
        placeholder="test"
      />
      <v-text-field
        label="Label"
        border="success lg"
      />
      <v-text-field
        label="Label"
        variant="outlined"
      />
    </v-container>
  </v-app>
</template>
<script setup>
</script>


@yuwu9145 yuwu9145 marked this pull request as ready for review May 16, 2024 04:21
@yuwu9145 yuwu9145 requested a review from a team May 16, 2024 04:21
@johnleider
Copy link
Member

Solo variants don't work with the border prop:

<v-text-field
        placeholder="test"
        variant="underlined"
        border
      />

@yuwu9145 yuwu9145 marked this pull request as draft May 21, 2024 12:24
@J-Sek
Copy link
Contributor

J-Sek commented May 27, 2024

I have a use case for detecting changed values (against a baseline object) in a big form. Currently my workaround requires custom class and a lengthy override. It would be much better to get this from the framework :)

.my-number-input--changed ::v-deep(.v-field:not(.v-field--error))
  .v-field__outline__start,
  .v-field__outline__notch::before,
  .v-field__outline__notch::after,
  .v-field__outline__end
    --v-field-border-opacity: 1
    border-color: orange !important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants