From de501c343f9413d91ea0a05b8de89bc10e5b7621 Mon Sep 17 00:00:00 2001 From: John Leider Date: Fri, 2 Feb 2024 18:33:48 -0600 Subject: [PATCH] fix(VCheckbox/VSwitch): incorrect default flex inherited from VInput --- packages/vuetify/src/components/VCheckbox/VCheckbox.sass | 3 +++ packages/vuetify/src/components/VCheckbox/_variables.scss | 3 +++ packages/vuetify/src/components/VSwitch/VSwitch.sass | 3 +++ packages/vuetify/src/components/VSwitch/_variables.scss | 1 + 4 files changed, 10 insertions(+) diff --git a/packages/vuetify/src/components/VCheckbox/VCheckbox.sass b/packages/vuetify/src/components/VCheckbox/VCheckbox.sass index 726776f308f..45691122968 100644 --- a/packages/vuetify/src/components/VCheckbox/VCheckbox.sass +++ b/packages/vuetify/src/components/VCheckbox/VCheckbox.sass @@ -4,5 +4,8 @@ @use './variables' as * .v-checkbox + &.v-input + flex: $checkbox-flex + .v-selection-control min-height: var(--v-input-control-height) diff --git a/packages/vuetify/src/components/VCheckbox/_variables.scss b/packages/vuetify/src/components/VCheckbox/_variables.scss index 2aef79810a7..ce35a41032a 100644 --- a/packages/vuetify/src/components/VCheckbox/_variables.scss +++ b/packages/vuetify/src/components/VCheckbox/_variables.scss @@ -1,2 +1,5 @@ +@use '../../styles/settings'; + +$checkbox-flex: 0 1 auto !default; $checkbox-disabled-color: rgba(var(--v-theme-on-surface), var(--v-disabled-opacity)) !default; $checkbox-error-color: rgb(var(--v-theme-error)) !default; diff --git a/packages/vuetify/src/components/VSwitch/VSwitch.sass b/packages/vuetify/src/components/VSwitch/VSwitch.sass index 0c44ebecace..43d79136556 100644 --- a/packages/vuetify/src/components/VSwitch/VSwitch.sass +++ b/packages/vuetify/src/components/VSwitch/VSwitch.sass @@ -88,6 +88,9 @@ .v-switch $switch-thumb-transform: $switch-track-width * .5 - $switch-thumb-width * .5 + $switch-thumb-offset + &.v-input + flex: $switch-flex + .v-selection-control min-height: var(--v-input-control-height) diff --git a/packages/vuetify/src/components/VSwitch/_variables.scss b/packages/vuetify/src/components/VSwitch/_variables.scss index 81e4c6f0ee7..9f4535bd4b6 100644 --- a/packages/vuetify/src/components/VSwitch/_variables.scss +++ b/packages/vuetify/src/components/VSwitch/_variables.scss @@ -1,6 +1,7 @@ @use '../../styles/settings'; // VSwitch +$switch-flex: 0 1 auto !default; $switch-control-input-transition: .2s transform settings.$standard-easing !default; $switch-error-background-color: rgb(var(--v-theme-error)) !default; $switch-error-color: rgb(var(--v-theme-on-error)) !default;