primevue-mirror/doc/tailwind/CSSLayerDoc.vue

31 lines
882 B
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>
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode hideCodeSandbox hideStackBlitz />
</template>
<script>
export default {
data() {
return {
code: {
basic: `@layer tailwind-base, primevue, tailwind-utilities;
@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;
}`
}
};
}
};
</script>