fide944
fide944
NNuxt
Created by fide944 on 1/21/2025 in #❓・help
do .server components support style tag in Nuxt?
The style classes are not working for my .server component when I run the build. They work on locall server perfectly. Is there another way that I nedd to import these classes maybe like in useHead or something? This is the bare minimun code for my .server component
<template>
<div class="hero-search">
<h1>server component</h1>
</div>
</template>
<style>
//this style is not working
.hero-search {
max-width: 100%;
margin: auto;
border-radius: var(--border-radius-8);
position: relative;
background-color: var(--white);
}

</style>
<template>
<div class="hero-search">
<h1>server component</h1>
</div>
</template>
<style>
//this style is not working
.hero-search {
max-width: 100%;
margin: auto;
border-radius: var(--border-radius-8);
position: relative;
background-color: var(--white);
}

</style>
5 replies