2024-03-30 12:19:34 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>The <i>options</i> property defines the how the CSS would be generated from the design tokens of the preset.</p>
|
2024-03-30 23:15:56 +00:00
|
|
|
<h4>prefix</h4>
|
2024-03-30 12:19:34 +00:00
|
|
|
<p>The prefix of the CSS variables, defaults to <i>p</i>. For instance, the <i>primary.color</i> design token would be <i>var(--p-primary-color)</i>.</p>
|
2024-06-13 06:43:29 +00:00
|
|
|
<DocSectionCode :code="code1" importCode hideToggleCode hideStackBlitz />
|
2024-03-30 23:15:56 +00:00
|
|
|
<h4>darkModeSelector</h4>
|
2024-03-30 12:19:34 +00:00
|
|
|
<p>
|
|
|
|
The CSS rule to encapsulate the CSS variables of the dark mode, the default is the <i>system</i> to generate <i>@media (prefers-color-scheme: dark)</i>. If you need to make the dark mode toggleable based on the user selection define a
|
2024-03-30 23:15:56 +00:00
|
|
|
class selector such as <i>.app-dark</i> and toggle this class at the document root. See the dark mode toggle section for an example.
|
2024-03-30 12:19:34 +00:00
|
|
|
</p>
|
2024-06-13 06:43:29 +00:00
|
|
|
<DocSectionCode :code="code2" importCode hideToggleCode hideStackBlitz />
|
2024-03-30 23:15:56 +00:00
|
|
|
<h4>cssLayer</h4>
|
2024-06-13 06:43:29 +00:00
|
|
|
<p>
|
2024-07-25 07:21:54 +00:00
|
|
|
Defines whether the styles should be defined inside a <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@layer" target="_blank" rel="noopener noreferrer">CSS layer</a> named <i>primeui</i> by default or not. A CSS layer would be
|
|
|
|
handy to declare a custom cascade layer for easier customization. The default is <i>false</i>.
|
2024-03-30 12:19:34 +00:00
|
|
|
</p>
|
2024-06-13 06:43:29 +00:00
|
|
|
<DocSectionCode :code="code3" importCode hideToggleCode hideStackBlitz />
|
2024-03-30 12:19:34 +00:00
|
|
|
</DocSectionText>
|
|
|
|
</template>
|
2024-06-13 06:43:29 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code1: {
|
|
|
|
basic: `
|
|
|
|
options: {
|
|
|
|
prefix: 'my'
|
|
|
|
}
|
|
|
|
`
|
|
|
|
},
|
|
|
|
code2: {
|
|
|
|
basic: `
|
|
|
|
options: {
|
|
|
|
darkModeSelector: '.my-app-dark'
|
|
|
|
}
|
|
|
|
`
|
|
|
|
},
|
|
|
|
code3: {
|
|
|
|
basic: `
|
|
|
|
options: {
|
|
|
|
cssLayer: {
|
|
|
|
name: 'primevue',
|
|
|
|
order: 'tailwind-base, primevue, tailwind-utilities'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|