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

34 lines
861 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>
2023-12-26 09:00:08 +00:00
<DocSectionCode :code="code" hideToggleCode hideCodeSandbox hideStackBlitz />
2023-12-26 08:13:55 +00:00
</DocSectionText>
</template>
<script>
export default {
data() {
return {
checked: false,
code: {
basic: `
@layer tailwind-base, primevue, tailwind-utilities;
@layer tailwind-base {
2023-12-26 09:00:08 +00:00
@tailwind base;
2023-12-26 08:13:55 +00:00
}
@layer tailwind-utilities {
2023-12-26 09:00:08 +00:00
@tailwind components;
@tailwind utilities;
2023-12-26 08:13:55 +00:00
}
`
}
};
}
};
</script>