From bd71b03f64fd89557fe8573db5ed8f7e3e3d4863 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Tue, 26 Dec 2023 11:13:55 +0300 Subject: [PATCH] Add CSS layer docs --- assets/menu/menu.json | 41 ++++++----- doc/{ => guides}/accessibility/ColorsDoc.vue | 0 .../accessibility/FormControlsDoc.vue | 0 .../accessibility/IntroductionDoc.vue | 0 .../accessibility/SemanticHTMLDoc.vue | 0 doc/{ => guides}/accessibility/WAIAriaDoc.vue | 0 doc/{ => guides}/accessibility/WCAGDoc.vue | 0 doc/guides/csslayer/BootstrapDoc.vue | 23 +++++++ doc/guides/csslayer/NormalizeDoc.vue | 23 +++++++ doc/guides/csslayer/ResetDoc.vue | 45 ++++++++++++ doc/guides/csslayer/SpecificityDoc.vue | 63 +++++++++++++++++ doc/guides/csslayer/TailwindDoc.vue | 33 +++++++++ doc/installation/StyledModeDoc.vue | 24 ++++++- doc/nuxt/configuration/CSSLayerOrderDoc.vue | 2 +- pages/{ => guides}/accessibility/index.vue | 12 ++-- pages/guides/csslayer/index.vue | 68 +++++++++++++++++++ pages/roadmap/index.vue | 12 +++- 17 files changed, 318 insertions(+), 28 deletions(-) rename doc/{ => guides}/accessibility/ColorsDoc.vue (100%) rename doc/{ => guides}/accessibility/FormControlsDoc.vue (100%) rename doc/{ => guides}/accessibility/IntroductionDoc.vue (100%) rename doc/{ => guides}/accessibility/SemanticHTMLDoc.vue (100%) rename doc/{ => guides}/accessibility/WAIAriaDoc.vue (100%) rename doc/{ => guides}/accessibility/WCAGDoc.vue (100%) create mode 100644 doc/guides/csslayer/BootstrapDoc.vue create mode 100644 doc/guides/csslayer/NormalizeDoc.vue create mode 100644 doc/guides/csslayer/ResetDoc.vue create mode 100644 doc/guides/csslayer/SpecificityDoc.vue create mode 100644 doc/guides/csslayer/TailwindDoc.vue rename pages/{ => guides}/accessibility/index.vue (80%) create mode 100644 pages/guides/csslayer/index.vue diff --git a/assets/menu/menu.json b/assets/menu/menu.json index 747343581..f597c2e68 100644 --- a/assets/menu/menu.json +++ b/assets/menu/menu.json @@ -14,13 +14,11 @@ }, { "name": "Nuxt", - "to": "/nuxt", - "badge": "NEW" + "to": "/nuxt" }, { "name": "Playground", - "to": "/playground", - "badge": "NEW" + "to": "/playground" } ] }, @@ -522,14 +520,23 @@ "href": "https://blocks.primevue.org" }, { - "name": "PrimeFlex CSS", - "icon": "pi pi-table", - "href": "https://primeflex.org" - }, - { - "name": "Accessibility", - "icon": "pi pi-users", - "to": "/accessibility" + "name": "Guides", + "icon": "pi pi-book", + "children": [ + { + "name": "Accessibility", + "to": "/guides/accessibility" + }, + { + "name": "CSS Layer", + "to": "/guides/csslayer" + }, + { + "name": "PrimeTV", + "icon": "pi pi-youtube", + "href": "https://www.youtube.com/channel/UCTgmp69aBOlLnPEqlUyetWw" + } + ] }, { "name": "Support", @@ -549,11 +556,6 @@ } ] }, - { - "name": "PrimeTV", - "icon": "pi pi-youtube", - "href": "https://www.youtube.com/channel/UCTgmp69aBOlLnPEqlUyetWw" - }, { "name": "Discover", "icon": "pi pi-search", @@ -589,6 +591,11 @@ { "name": "PrimeGear", "href": "https://gear.primefaces.org" + }, + { + "name": "PrimeFlex CSS", + "icon": "pi pi-table", + "href": "https://primeflex.org" } ] } diff --git a/doc/accessibility/ColorsDoc.vue b/doc/guides/accessibility/ColorsDoc.vue similarity index 100% rename from doc/accessibility/ColorsDoc.vue rename to doc/guides/accessibility/ColorsDoc.vue diff --git a/doc/accessibility/FormControlsDoc.vue b/doc/guides/accessibility/FormControlsDoc.vue similarity index 100% rename from doc/accessibility/FormControlsDoc.vue rename to doc/guides/accessibility/FormControlsDoc.vue diff --git a/doc/accessibility/IntroductionDoc.vue b/doc/guides/accessibility/IntroductionDoc.vue similarity index 100% rename from doc/accessibility/IntroductionDoc.vue rename to doc/guides/accessibility/IntroductionDoc.vue diff --git a/doc/accessibility/SemanticHTMLDoc.vue b/doc/guides/accessibility/SemanticHTMLDoc.vue similarity index 100% rename from doc/accessibility/SemanticHTMLDoc.vue rename to doc/guides/accessibility/SemanticHTMLDoc.vue diff --git a/doc/accessibility/WAIAriaDoc.vue b/doc/guides/accessibility/WAIAriaDoc.vue similarity index 100% rename from doc/accessibility/WAIAriaDoc.vue rename to doc/guides/accessibility/WAIAriaDoc.vue diff --git a/doc/accessibility/WCAGDoc.vue b/doc/guides/accessibility/WCAGDoc.vue similarity index 100% rename from doc/accessibility/WCAGDoc.vue rename to doc/guides/accessibility/WCAGDoc.vue diff --git a/doc/guides/csslayer/BootstrapDoc.vue b/doc/guides/csslayer/BootstrapDoc.vue new file mode 100644 index 000000000..58c76a568 --- /dev/null +++ b/doc/guides/csslayer/BootstrapDoc.vue @@ -0,0 +1,23 @@ + + + diff --git a/doc/guides/csslayer/NormalizeDoc.vue b/doc/guides/csslayer/NormalizeDoc.vue new file mode 100644 index 000000000..d158c8505 --- /dev/null +++ b/doc/guides/csslayer/NormalizeDoc.vue @@ -0,0 +1,23 @@ + + + diff --git a/doc/guides/csslayer/ResetDoc.vue b/doc/guides/csslayer/ResetDoc.vue new file mode 100644 index 000000000..8026d6a1e --- /dev/null +++ b/doc/guides/csslayer/ResetDoc.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/doc/guides/csslayer/SpecificityDoc.vue b/doc/guides/csslayer/SpecificityDoc.vue new file mode 100644 index 000000000..aa343cf39 --- /dev/null +++ b/doc/guides/csslayer/SpecificityDoc.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/doc/guides/csslayer/TailwindDoc.vue b/doc/guides/csslayer/TailwindDoc.vue new file mode 100644 index 000000000..dda77ddf2 --- /dev/null +++ b/doc/guides/csslayer/TailwindDoc.vue @@ -0,0 +1,33 @@ + + + diff --git a/doc/installation/StyledModeDoc.vue b/doc/installation/StyledModeDoc.vue index d87b40aae..49c9af453 100644 --- a/doc/installation/StyledModeDoc.vue +++ b/doc/installation/StyledModeDoc.vue @@ -4,7 +4,13 @@ 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 Themes section for the complete list of available themes to choose from.

- + +

+ The classes of PrimeVue is defined under the primevue 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 + CSS Layer for more information. +

+ @@ -12,8 +18,22 @@ export default { data() { return { - code: { + code1: { basic: "\nimport 'primevue/resources/themes/lara-light-green/theme.css'\n" + }, + code2: { + basic: ` +@layer tailwind-base, primereact, tailwind-utilities; + +@layer tailwind-base { + @tailwind base; +} + +@layer tailwind-utilities { + @tailwind components; + @tailwind utilities; +} +` } }; } diff --git a/doc/nuxt/configuration/CSSLayerOrderDoc.vue b/doc/nuxt/configuration/CSSLayerOrderDoc.vue index 4d1b81a57..240c10431 100644 --- a/doc/nuxt/configuration/CSSLayerOrderDoc.vue +++ b/doc/nuxt/configuration/CSSLayerOrderDoc.vue @@ -1,6 +1,6 @@ diff --git a/pages/roadmap/index.vue b/pages/roadmap/index.vue index f075ad043..f6da98c82 100644 --- a/pages/roadmap/index.vue +++ b/pages/roadmap/index.vue @@ -165,8 +165,16 @@
-
Designer
-
+
Design
+
+
+

New UI Theme

+

Brand new default theme with a modern and attractive design.

+
+
+
+
+

New UI Based Theme Editor