#why my css is not working in page?

36 messages · Page 1 of 1 (latest)

severe jewel
#

everything in directory pages is working fine but if i put new page in pages/sample-folder/new.vue then css not work in new.vue

#

please explain to me

warm spire
#

Hello @severe jewel , try sharing a bit more context, some code and screenshots may help

severe jewel
#

@warm spire hi

#

i seen my trouble

#

link href is only use for vue file in pages

#

i want apply css to every file

#

how can solve it?

#

create.vue is not work with my css

#

@warm spire

icy spade
#

are you using the styled or unstyled theme of PrimeVue? https://primevue.org/nuxt/#theming

If styled, I don't see your theme listed in the css property of your nuxt.config:

css: ['primevue/resources/themes/aura-light-green/theme.css']

The ultimate collection of design-agnostic, flexible and accessible Vue UI Components.

severe jewel
#

i use styled

#

i use head with link rel to switch theme

#

@icy spade \

icy spade
#

the link to your CSS is no longer valid when inside a subdirectory, I would put your css within the css property in your nuxt.config and use a relative path like ~/assets/css/theme.css

severe jewel
#

yes

#

i understand

#

but you know

#

i want switch theme

#

primevue guild me

#

put the code in head meta

#

do you have any new solution to switch theme?

icy spade
severe jewel
#

yest

#

thank you sm

severe jewel
#

i used process.env to solve my trouble

#

absolute path

severe jewel
#

hi

#

@warm spire can i bother you?

#

i want use rules of vee validation for every component nuxt

#

how can i config them to nuxt.config.js?

warm spire
#

Hi @severe jewel not sure what you are actually trying to achieve but if you could create another thread and be more precise it I am sure we'll find the solution

severe jewel
#

yes