primevue-mirror/doc/tailwind/CSSLayerDoc.vue

37 lines
1.2 KiB
Vue
Raw Normal View History

2023-10-03 10:33:47 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>
2023-10-07 13:04:27 +00:00
Tailwind CSS can be used with styled or unstyled modes of PrimeVue. In both cases, <a href="https://tailwindcss.com/docs/preflight" target="_blank" rel="noopener noreferrer">preflight</a> mode may break styling of the core functionality
so <i>@layer</i> configuration in your style file that includes tailwind styles is necessary for compatibility.
2023-10-03 10:33:47 +00:00
</p>
2023-10-25 03:17:40 +00:00
<p>
If you are using <strong>Nuxt</strong> modules of <NuxtLink to="/nuxt">PrimeVue</NuxtLink> and <a href="https://tailwindcss.nuxtjs.org/" target="_blank" rel="noopener noreferrer">Tailwind</a>, the layer order is required to be configured
with the <NuxtLink to="/nuxt/#layerorder">cssLayerOrder</NuxtLink>.
</p>
2023-10-03 10:33:47 +00:00
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode hideCodeSandbox hideStackBlitz />
</template>
<script>
export default {
data() {
return {
code: {
2023-10-15 09:38:39 +00:00
basic: `
@layer tailwind-base, primevue, tailwind-utilities;
2023-10-03 10:33:47 +00:00
@layer tailwind-base {
@tailwind base;
}
@layer tailwind-utilities {
2023-10-07 13:04:27 +00:00
@tailwind components;
2023-10-03 10:33:47 +00:00
@tailwind utilities;
2023-10-15 09:38:39 +00:00
}
`
2023-10-03 10:33:47 +00:00
}
};
}
};
</script>