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

Need way to move vuetify-theme-stylesheet from top of head section to any position #526

Open
itelmenko opened this issue Mar 5, 2024 · 0 comments
Labels
feature request Feature request

Comments

@itelmenko
Copy link

Is your feature request related to a problem? Please describe.
I have bought Nuxt template with bootstrap. But I have included also Vuetify to this template. I have redefined Vuetify's themes.

// vuetify.ts
import '@mdi/font/css/materialdesignicons.css'

import 'vuetify/styles'
import { createVuetify } from 'vuetify'

const customDarkTheme = {
    dark: true,
    colors: {
        primary: "#f74780",
        secondary: "#03dac6",
    },
};

const customLightTheme = {
    dark: false,
    colors: {
        primary: "#f74780",
        secondary: "#00ccff",

    },
};

export default defineNuxtPlugin((app) => {
    const vuetify = createVuetify({
        // ... your configuration
        theme: {
            defaultTheme: 'custom-light',
            themes: {
                'custom-dark': customDarkTheme,
                'custom-light': customLightTheme,
            },
        },
    })
    app.vueApp.use(vuetify)
})

But "primary" const does not work, because in html is <style id="vuetify-theme-stylesheet"> in the top of head section.
After this I see
<link rel="stylesheet" href="/_nuxt/assets/css/vendors/bootstrap.min.css">.
I have not chance move vuetify-theme-stylesheet in to the bottom of the head section.

Describe the solution you'd like
We need generate css-file instead inline styles vuetify-theme-stylesheet. Then we can move it to any position in nuxt.config.ts

@itelmenko itelmenko added the feature request Feature request label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

1 participant