primevue-mirror/doc/guides/csslayer/TailwindDoc.vue

34 lines
809 B
Vue
Raw Normal View History

2023-12-26 08:13:55 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>
Tailwind CSS includes a reset utility in base called <a href="https://tailwindcss.com/docs/preflight" target="_blank" rel="noopener noreferrer">preflight</a>. If you are using this feature, wrap the base and utilities in separate layers
and make sure primevue layer comes after the base.
</p>
<DocSectionCode :code="code" />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
checked: false,
code: {
basic: `
@layer tailwind-base, primevue, tailwind-utilities;
@layer tailwind-base {
@tailwind base;
}
@layer tailwind-utilities {
@tailwind components;
@tailwind utilities;
}
`
}
};
}
};
</script>