Is it possible to not use the global css values on body tag ? #2953
-
Hey, I was just using Naive UI alongside Tailwind CSS and I noticed some weird behavior regarding the font size and style. I was scratching my head for sometime and just realized Naive UI applies certain css values to <style cssr-id="n-global">
body {
margin: 0;
font-size: 14px;
font-family: v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
line-height: 1.6;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
}
body input {
font-family: inherit;
font-size: inherit;
}</style> I wonder if it's possible to have Naive UI not apply these values ? Note that I'm aware of this snippet and I'm already applying it: const meta = document.createElement('meta')
meta.name = 'naive-ui-style'
document.head.appendChild(meta)
vueApp.mount('#app') |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I think what you said is right. I've make it optional in 55b1332 It'll be released in next version. |
Beta Was this translation helpful? Give feedback.
-
@07akioni, hi, maybe you know how to apply this code for nuxt 3 const meta = document.createElement('meta')
meta.name = 'naive-ui-style'
document.head.appendChild(meta)
vueApp.mount('#app') |
Beta Was this translation helpful? Give feedback.
I think what you said is right.
I've make it optional in 55b1332
It'll be released in next version.