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

[Bug Report][3.4.2] v-chip different theme #18714

Open
Ribeiro-Tiago opened this issue Nov 17, 2023 · 4 comments
Open

[Bug Report][3.4.2] v-chip different theme #18714

Ribeiro-Tiago opened this issue Nov 17, 2023 · 4 comments
Assignees
Labels
C: VChip T: enhancement Functionality that enhances existing features

Comments

@Ribeiro-Tiago
Copy link

Environment

Vuetify Version: 3.4.2
Vue Version: 3.3.8
Browsers: Chrome 119.0.0.0
OS: Mac OS 10.15.7

Steps to reproduce

  • setup a project with a default theme
  • use the "theme" property or v-theme-provider to change the theme of a specific component

Expected Behavior

chips to switch to specified theme

Actual Behavior

they remain with default theme

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

according to the documentation it's possible to have specific components with different themes by using the theme property or v-theme-provider. These do not work. In my case I have a light theme but in some components (like the chips) i wanna have the dark theme

This was possible in v2 and according to the documentation still should be

@KaelWD
Copy link
Member

KaelWD commented Nov 21, 2023

The problem here is v-chip's default variant is tonal which just uses the current text color. If you set variant="flat" or a specific color you will see it does change with the theme.

@KaelWD KaelWD added T: enhancement Functionality that enhances existing features C: VChip labels Nov 21, 2023
@KaelWD KaelWD added this to the v4.0.0 milestone Nov 21, 2023
@KaelWD KaelWD self-assigned this Nov 21, 2023
@Ribeiro-Tiago
Copy link
Author

indeed. Shouldn't theme be independent of variant though?

@KaelWD
Copy link
Member

KaelWD commented Nov 21, 2023

It is, the default text color is just inherited.

@J-Sek
Copy link
Contributor

J-Sek commented Nov 15, 2024

I wanted to understand the problem a little more and created this demo, where you can shift chips outside of the black background.

recording

Peek 2024-11-15 20-38

So if theme="dark" would just blindly switch CSS rules to those dedicated for dark theme, then chips would disappear - making it a footgun. IMO it is better to leave it as-is.

As a workaround (when used on black/white background) - [flat] on white has identical color to [tonal] on black
image

...or wrap the section within a VCard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VChip T: enhancement Functionality that enhances existing features
Projects
None yet
Development

No branches or pull requests

3 participants