@patternfly/documentation-framework 6.0.0-alpha.8 → 6.0.0-alpha.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +1165 -0
  2. package/app.js +2 -5
  3. package/components/autoLinkHeader/autoLinkHeader.css +2 -2
  4. package/components/autoLinkHeader/autoLinkHeader.js +8 -19
  5. package/components/cssVariables/cssVariables.css +9 -11
  6. package/components/cssVariables/cssVariables.js +19 -32
  7. package/components/example/example.css +14 -58
  8. package/components/example/example.js +149 -78
  9. package/components/example/exampleToolbar.js +3 -2
  10. package/components/footer/footer.css +16 -16
  11. package/components/footer/footer.js +32 -32
  12. package/components/gdprBanner/gdprBanner.css +0 -3
  13. package/components/gdprBanner/gdprBanner.js +22 -16
  14. package/components/inlineAlert/inlineAlert.js +1 -1
  15. package/components/link/link.js +23 -18
  16. package/components/propsTable/propsTable.js +14 -10
  17. package/components/sectionGallery/TextSummary.js +5 -5
  18. package/components/sectionGallery/sectionDataListLayout.js +87 -41
  19. package/components/sectionGallery/sectionGallery.css +6 -39
  20. package/components/sectionGallery/sectionGalleryLayout.js +73 -23
  21. package/components/sectionGallery/sectionGalleryToolbar.js +47 -12
  22. package/components/sideNav/sideNav.js +3 -4
  23. package/components/tableOfContents/tableOfContents.css +26 -35
  24. package/components/tableOfContents/tableOfContents.js +58 -28
  25. package/layouts/sideNavLayout/sideNavLayout.css +1 -36
  26. package/layouts/sideNavLayout/sideNavLayout.js +188 -101
  27. package/package.json +12 -19
  28. package/pages/404/404.css +2 -2
  29. package/pages/404/index.js +23 -36
  30. package/routes.js +3 -1
  31. package/scripts/md/anchor-header.js +1 -1
  32. package/scripts/md/parseMD.js +20 -18
  33. package/scripts/md/styled-tags.js +22 -14
  34. package/scripts/webpack/webpack.base.config.js +7 -18
  35. package/scripts/writeScreenshots.js +2 -2
  36. package/templates/mdx.css +11 -288
  37. package/templates/mdx.js +40 -43
  38. package/templates/patternfly-docs/patternfly-docs.source.js +8 -8
  39. package/versions.json +42 -14
  40. package/components/sideNav/sideNav.css +0 -21
  41. package/pages/global-css-variables.md +0 -109
  42. package/pages/img/component-variable-mapping.png +0 -0
@@ -1,109 +0,0 @@
1
- ---
2
- id: Global CSS variables
3
- section: developer-resources
4
- ---
5
-
6
- import { CSSVariables } from '../components/cssVariables/cssVariables';
7
-
8
-
9
- ## About CSS variables
10
-
11
- The CSS variable system is a two-layer theming system where global variables inform component variables.
12
-
13
- ### Global variables
14
-
15
- Global variables define and enforce global style elements (like values for color, spacing, and font size) across the entire system.
16
-
17
- Global variables follow this formula:
18
-
19
- `--pf-v5-global--concept--PropertyCamelCase--modifier--state`
20
-
21
- Where...
22
-
23
- - A `concept` is something like a `spacer` or `main-title`.
24
- - A `PropertyCamelCase` is something like `BackgroundColor` or `FontSize`.
25
- - A `modifier` is something like `sm` or `lg`.
26
- - A `state` is something like `hover` or `expanded`.
27
-
28
- Example:
29
- - Note: global variables are scoped to `:root`
30
- ```css
31
- :root {
32
- /* Default & hovered link colors */
33
- --pf-v5-global--link--Color: #06c;
34
- --pf-v5-global--link--Color--hover: #004080;
35
- }
36
- ```
37
-
38
- <br/>
39
- The [full list of global CSS variables](#global-css-variables) can be found below.
40
-
41
- ### Component variables
42
-
43
- Component variables are used to define custom properties at the component-level. Component variables are always defined by global variables.
44
-
45
- Component variables follow this formula:
46
-
47
- `--pf-v5-c-block__element--modifier--state--breakpoint--['child'|tag|c-component]pseudo-element--PropertyCamelCase`
48
-
49
- Where...
50
-
51
- - `pf-v5-c-block` refers to the block, usually the component or layout name, like `pf-v5-c-alert`.
52
- - `__element` refers to the element inside of the block, like `__title`.
53
- - `modifier` is prefixed with`-m` and refers to a modifier class such as `.pf-m-danger`.
54
- - `state` is something like `hover` or `active`.
55
- - `breakpoint` is a media query breakpoint such as `sm` for `$pf-v5-global--breakpoint--xs`.
56
- - `pseudo-element` is either `before` or `after`.
57
- - `child`, `tag`, or `c-component` refers to a child element. It could be a tag or component name, like `svg` or `c-menu`, or it could use `child` to refer to any child element. If any modifiers, states, breakpoints, or pseudo-elements are on the child, include those after this portion of the name.
58
-
59
- Example:
60
- - Note: component variables are scoped to the top-level component selector
61
- ```css
62
- .pf-v5-c-button {
63
- /* Default, primary, and primary hovered button background colors */
64
- --pf-v5-c-button--BackgroundColor: transparent;
65
- --pf-v5-c-button--m-primary--BackgroundColor: var(--pf-v5-global--primary-color--100);
66
- --pf-v5-c-button--m-primary--hover--BackgroundColor: var(--pf-v5-global--primary-color--200);
67
- }
68
- ```
69
-
70
- <br/>
71
- Component variables are listed at the bottom of each component page (for example, [button css variables](/components/button#css-variables)).
72
-
73
- Note that all component variables are declared at the top component level (for example, `.pf-v5-c-button`). The component variable table linked above also shows all usages of each variable and the values they evaluate to in each case - expand any component variable row to view the global variable it is mapped to.
74
-
75
- ![Component variable mapping](./img/component-variable-mapping.png)
76
-
77
- ### Breakpoint variables and class suffixes
78
-
79
- PatternFly defines a number of standard breakpoints. These are always used as a `min-width` breakpoint; i.e. using the `-md` breakpoint would apply to everything at the `-md` width and wider. (There is one exception to this, which is in the responsive behavior of the [table component](/components/table).)
80
-
81
- Breakpoint suffixes are used in utility classes and layouts as well as in many components as a way to apply class styles at a specified breakpoint. When available, `{-on-[breakpoint]}` will be shown as an available suffix for the class in the usage section of the documentation. The breakpoint suffix is optional and if not specified, the base class will be used. There are breakpoints for `sm`, `md`, `lg`, `xl`, and `2xl`, and the values for the corresponding breakpoints are defined below in the global variables `—pf-v5-global—breakpoint—[breakpoint]`.
82
-
83
- ### Using the variable system
84
-
85
- PatternFly 4 styles provide a default starting point. You can use the variable system to make adjustments to that default styling. When you change one or more elements, you should package those values into a new SCSS stylesheet to replace the default styling.
86
-
87
- Overrides to PatternFly variables should be made at the `:root` level for global variables or at the top-level component selector for component variables (for example, `.pf-v5-c-button`), as these overrides will cascade down to children elements accordingly.
88
-
89
- Example:
90
- - Change the global primary color to red, but keep the original primary blue color as the background for primary buttons.
91
- ```css
92
- /* Override global primary color 100 to red */
93
- :root {
94
- --pf-v5-global--primary-color--100: var(--pf-v5-global--palette--red-400);
95
- }
96
-
97
- /* Override the above override for only the primary button background color */
98
- .pf-v5-c-button {
99
- --pf-v5-c-button--m-primary--BackgroundColor: var(--pf-v5-global--palette--blue-400);
100
- }
101
- ```
102
-
103
- ## Global CSS variables
104
-
105
- <CSSVariables prefix="patternfly_variables" selector=":where(:root)" hideSelectorColumn />
106
-
107
- ## Chart CSS variables
108
-
109
- <CSSVariables prefix="patternfly_charts" hideSelectorColumn />