primevue-mirror/doc/installation/StyledModeDoc.vue

42 lines
1.6 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
2023-07-09 21:13:49 +00:00
<p>
2023-07-10 08:47:46 +00:00
Styled mode is based on pre-skinned components with opinionated themes like Material, Bootstrap or PrimeOne themes. Theme is the required css file to be imported, visit the
2023-07-09 21:13:49 +00:00
<NuxtLink to="/theming/#themes">Themes</NuxtLink> section for the complete list of available themes to choose from.
</p>
2023-12-26 08:13:55 +00:00
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
<p>
The classes of PrimeVue is defined under the <i>primevue</i> CSS layer to be easier to customize by having low specificity. If you are using a CSS library that styles default HTML elements such as Tailwind Preflight, Bootstrap, Normalize
or similar a custom CSS layer configuration might be necessary. Note that this only applies to Styled Mode as Unstyled Mode does not use any default styles or layers. Here is an example with Tailwind, visit the
<NuxtLink to="/guides/csslayer">CSS Layer</NuxtLink> for more information.
</p>
<DocSectionCode :code="code2" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
2023-02-28 08:29:30 +00:00
</DocSectionText>
</template>
<script>
export default {
data() {
return {
2023-12-26 08:13:55 +00:00
code1: {
2023-11-20 08:33:43 +00:00
basic: "\nimport 'primevue/resources/themes/lara-light-green/theme.css'\n"
2023-12-26 08:13:55 +00:00
},
code2: {
basic: `
2023-12-26 08:26:13 +00:00
/* Order */
@layer reset, primevue;
2023-12-26 08:13:55 +00:00
2023-12-26 08:26:13 +00:00
/* Reset CSS */
@layer reset {
button,
input {
/* CSS to Reset */
}
2023-12-26 08:13:55 +00:00
}
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>