You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a v-banner with the app property placed directly inside v-main to show a warning on top of scrollable content. The default background colour for this is transparent, so content is visible under the banner. Setting the color property allows me to set a color as expected, but ideally I want this banner to have the same colour as a v-card background for both light and dark themes.
I can achieve this by setting :color="$vuetify.theme.dark ? '#1E1E1E' : 'white', but what's the best way to get the card background color dynamically instead of hardcoding it like this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a v-banner with the app property placed directly inside v-main to show a warning on top of scrollable content. The default background colour for this is transparent, so content is visible under the banner. Setting the color property allows me to set a color as expected, but ideally I want this banner to have the same colour as a v-card background for both light and dark themes.
I can achieve this by setting
:color="$vuetify.theme.dark ? '#1E1E1E' : 'white'
, but what's the best way to get the card background color dynamically instead of hardcoding it like this?Beta Was this translation helpful? Give feedback.
All reactions