@patternfly/documentation-framework 2.0.0-alpha.9 → 5.0.2

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 (71) hide show
  1. package/CHANGELOG.md +614 -0
  2. package/README.md +1 -1
  3. package/app.js +20 -14
  4. package/assets/Favicon-Light-16x16.png +0 -0
  5. package/assets/Favicon-Light-32x32.png +0 -0
  6. package/assets/Favicon-Light-48x48.png +0 -0
  7. package/assets/Favicon-Light.png +0 -0
  8. package/assets/android-chrome-36x36.png +0 -0
  9. package/assets/android-chrome-48x48.png +0 -0
  10. package/assets/android-chrome-96x96.png +0 -0
  11. package/components/autoLinkHeader/autoLinkHeader.css +2 -2
  12. package/components/autoLinkHeader/autoLinkHeader.js +18 -13
  13. package/components/cssVariables/cssSearch.js +3 -4
  14. package/components/cssVariables/cssVariables.css +4 -4
  15. package/components/cssVariables/cssVariables.js +83 -84
  16. package/components/example/example.css +29 -29
  17. package/components/example/example.js +34 -6
  18. package/components/footer/footer.css +16 -16
  19. package/components/footer/footer.js +16 -16
  20. package/components/functionsTable/functionsTable.js +57 -0
  21. package/components/gdprBanner/gdprBanner.css +2 -2
  22. package/components/gdprBanner/gdprBanner.js +3 -3
  23. package/components/inlineAlert/inlineAlert.js +1 -1
  24. package/components/link/link.js +1 -2
  25. package/components/propsTable/propsTable.js +85 -79
  26. package/components/sectionGallery/TextSummary.js +31 -0
  27. package/components/sectionGallery/sectionDataListLayout.js +51 -0
  28. package/components/sectionGallery/sectionGallery.css +53 -0
  29. package/components/sectionGallery/sectionGallery.js +76 -0
  30. package/components/sectionGallery/sectionGalleryLayout.js +41 -0
  31. package/components/sectionGallery/sectionGalleryToolbar.js +38 -0
  32. package/components/sectionGallery/sectionGalleryWrapper.js +110 -0
  33. package/components/sideNav/sideNav.css +12 -12
  34. package/components/sideNav/sideNav.js +44 -16
  35. package/components/tableOfContents/tableOfContents.css +17 -17
  36. package/helpers/codesandbox.js +3 -5
  37. package/helpers/getTitle.js +2 -2
  38. package/layouts/sideNavLayout/sideNavLayout.css +7 -11
  39. package/layouts/sideNavLayout/sideNavLayout.js +59 -45
  40. package/package.json +28 -29
  41. package/pages/404/404.css +2 -2
  42. package/pages/404/index.js +1 -1
  43. package/pages/global-css-variables.md +16 -16
  44. package/routes.js +20 -10
  45. package/scripts/cli/build.js +0 -1
  46. package/scripts/cli/cli.js +2 -1
  47. package/scripts/cli/generate.js +2 -2
  48. package/scripts/cli/start.js +6 -8
  49. package/scripts/md/parseMD.js +46 -11
  50. package/scripts/md/styled-tags.js +8 -4
  51. package/scripts/tsDocgen.js +119 -91
  52. package/scripts/typeDocGen.js +209 -0
  53. package/scripts/webpack/getHtmlWebpackPlugins.js +1 -2
  54. package/scripts/webpack/prerender.js +1 -2
  55. package/scripts/webpack/webpack.base.config.js +35 -35
  56. package/scripts/webpack/webpack.client.config.js +11 -8
  57. package/scripts/webpack/webpack.server.config.js +8 -5
  58. package/scripts/writeScreenshots.js +3 -3
  59. package/templates/html.ejs +6 -8
  60. package/templates/mdx.css +156 -161
  61. package/templates/mdx.js +122 -51
  62. package/templates/patternfly-docs/content/extensions/extension/design-guidelines/design-guidelines.md +2 -0
  63. package/templates/patternfly-docs/content/extensions/extension/examples/basic.md +2 -0
  64. package/templates/sitemap.ejs +1 -1
  65. package/versions.json +32 -14
  66. package/assets/favicon-16x16.png +0 -0
  67. package/assets/favicon-32x32.png +0 -0
  68. package/assets/favicon-48x48.png +0 -0
  69. package/assets/favicon.ico +0 -0
  70. package/components/topNav/topNav.css +0 -30
  71. package/pages/red-hat-font.md +0 -40
package/templates/mdx.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { PageSection, Title, PageSectionVariants, BackToTop, PageGroup, Page, Text, TextContent } from '@patternfly/react-core';
2
+ import { PageSection, Title, Tooltip, PageSectionVariants, Button, BackToTop, Flex, FlexItem, PageGroup, Page, Text, TextContent, Label } from '@patternfly/react-core';
3
3
  import { css } from '@patternfly/react-styles';
4
4
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
5
5
  import { Router, useLocation } from '@reach/router';
@@ -7,12 +7,14 @@ import { CSSVariables, PropsTable, TableOfContents, Link, AutoLinkHeader, Inline
7
7
  import { capitalize, getTitle, slugger, trackEvent } from '../helpers';
8
8
  import './mdx.css';
9
9
  import { convertToReactComponent } from '@patternfly/ast-helpers';
10
+ import { FunctionsTable } from '../components/functionsTable/functionsTable';
10
11
 
11
12
  const MDXChildTemplate = ({
12
13
  Component,
13
14
  source,
14
15
  toc = [],
15
- index = 0
16
+ index = 0,
17
+ id
16
18
  }) => {
17
19
  const {
18
20
  propComponents = [],
@@ -20,8 +22,9 @@ const MDXChildTemplate = ({
20
22
  cssPrefix = [],
21
23
  optIn,
22
24
  beta,
23
- katacodaBroken,
24
- katacodaLayout
25
+ deprecated,
26
+ newImplementationLink,
27
+ functionDocumentation = []
25
28
  } = Component.getPageData();
26
29
  const cssVarsTitle = cssPrefix.length > 0 && 'CSS variables';
27
30
  const propsTitle = propComponents.length > 0 && 'Props';
@@ -31,6 +34,9 @@ const MDXChildTemplate = ({
31
34
  }
32
35
  if (cssVarsTitle && !toc.find(item => item.text === cssVarsTitle)) {
33
36
  toc.push({ text: cssVarsTitle });
37
+ if (cssPrefix.length > 1) {
38
+ toc.push(cssPrefix.map(cssPrefix => ({ text: `Prefixed with '${cssPrefix}'` })));
39
+ }
34
40
  }
35
41
  // We don't add `id`s in anchor-header.js for items where id === slugger(text)
36
42
  // in order to save ~10KB bandwidth.
@@ -54,28 +60,40 @@ const MDXChildTemplate = ({
54
60
  )}
55
61
  {beta && (
56
62
  <InlineAlert title="Beta feature">
57
- This beta component is currently under review and is still open for further evolution. It is available for use in product.
58
- Beta components are considered for promotion on a quarterly basis. Please join in and give us your feedback or submit any questions on the <a href="https://forum.patternfly.org/">PatternFly forum</a> or via <a href="//slack.patternfly.org/" target="_blank" rel="noopener noreferrer">Slack</a>.
59
- To learn more about the process, visit our <Link to="/get-started/about#beta-components">about page</Link> or our <a href="https://github.com/patternfly/patternfly-org/tree/main/beta-component-promotion">Beta components</a> page on GitHub.
63
+ This beta component is currently under review and is still open for further evolution. It is available for use in product. Beta components are considered for promotion on a quarterly basis. Please join in and give us your feedback or submit any questions on the <a href="https://forum.patternfly.org/">PatternFly forum</a> or via <a href="//slack.patternfly.org/" target="_blank" rel="noopener noreferrer">Slack</a>. To learn more about the process, visit our <Link to="/get-started/about#beta-components">about page</Link> or our <a href="https://github.com/patternfly/patternfly-org/tree/main/beta-component-promotion">Beta components</a> page on GitHub.
60
64
  </InlineAlert>
61
65
  )}
62
- {katacodaBroken && (
63
- <InlineAlert variant="warning" title="Down for maintenance">
64
- The embedded version of our tutorials are broken, but you can still access our tutorials on <a href="https://www.katacoda.com/patternfly">Katacoda.com <ExternalLinkAltIcon /></a>.
66
+ {(deprecated || source === 'react-deprecated' || source === 'html-deprecated') && (
67
+ <InlineAlert title="Deprecated feature" variant="warning">
68
+ This implementation has been deprecated in favor of a newer implementation, and is no longer getting maintained or enhanced.
69
+ {newImplementationLink && (
70
+ <React.Fragment>
71
+ You can find the <Link to={newImplementationLink}>updated implementation here</Link>.
72
+ </React.Fragment>
73
+ )}
74
+ {' '}To learn more about the process, visit our <Link to="/get-started/about#major-release-cadence">about page</Link>.
65
75
  </InlineAlert>
66
76
  )}
67
77
  </React.Fragment>
68
78
  );
69
79
  // Create dynamic component for @reach/router
70
80
  const ChildComponent = () => (
71
- <div className="pf-u-display-flex ws-mdx-child-template">
81
+ <div className="pf-v5-u-display-flex ws-mdx-child-template">
72
82
  {toc.length > 1 && (
73
83
  <TableOfContents items={toc} />
74
84
  )}
75
- <div className={katacodaLayout? "ws-mdx-content-katacoda" : "ws-mdx-content"}>
76
- <div className={katacodaLayout ? "" : "ws-mdx-content-content"}>
85
+ <div className="ws-mdx-content">
86
+ <div className={source === 'landing-pages' ? "ws-landing-page" : "ws-mdx-content-content"}>
77
87
  {InlineAlerts}
78
88
  <Component />
89
+ {functionDocumentation.length > 0 && (
90
+ <React.Fragment>
91
+ <AutoLinkHeader size="h2" className="ws-h2" id="functions">
92
+ Functions
93
+ </AutoLinkHeader>
94
+ <FunctionsTable functionDescriptions={functionDocumentation}/>
95
+ </React.Fragment>
96
+ )}
79
97
  {propsTitle && (
80
98
  <React.Fragment>
81
99
  <AutoLinkHeader size="h2" className="ws-h2" id="props">
@@ -92,15 +110,17 @@ const MDXChildTemplate = ({
92
110
  ))}
93
111
  </React.Fragment>
94
112
  )}
95
- {cssVarsTitle && (
113
+ {cssPrefix.length > 0 && (
96
114
  <React.Fragment>
97
115
  <AutoLinkHeader size="h2" className="ws-h2" id="css-variables">
98
116
  {cssVarsTitle}
99
117
  </AutoLinkHeader>
100
- <CSSVariables prefix={cssPrefix} />
118
+ {cssPrefix.map(prefix => (
119
+ <CSSVariables autoLinkHeader={cssPrefix.length > 1} prefix={prefix} />
120
+ ))}
101
121
  </React.Fragment>
102
122
  )}
103
- {!katacodaLayout && sourceLink && (
123
+ {sourceLink && (
104
124
  <React.Fragment>
105
125
  <br />
106
126
  <a href={sourceLink} target="_blank" onClick={() => trackEvent('view_source_click', 'click_event', source.toUpperCase())}>View source on GitHub</a>
@@ -121,10 +141,21 @@ export const MDXTemplate = ({
121
141
  id,
122
142
  componentsData
123
143
  }) => {
124
- const sourceKeys = sources.map(v => v.source);
144
+ const isDeprecated = sources.some(source => source.source === "react-deprecated" || source.source === "html-deprecated") && !sources.some(source => source.source === "react" || source.source === "html");
145
+ const isBeta = sources.some(source => source.beta)
146
+ const isDemo = sources.some(source => source.source === "react-demos" || source.source === "html-demos") && !sources.some(source => source.source === "react" || source.source === "html");
147
+ // Build obj mapping source names to text displayed on tabs
148
+ const tabNames = sources.reduce((acc, curSrc) => {
149
+ const { source, tabName } = curSrc;
150
+ // use tabName for tab name if present, otherwise default to source
151
+ const tabLinkText = tabName || capitalize(source.replace('html', 'HTML').replace(/-/g, ' '));
152
+ acc[source] = tabLinkText;
153
+ return acc;
154
+ }, {});
155
+ const sourceKeys = Object.keys(tabNames);
125
156
  const isSinglePage = sourceKeys.length === 1;
126
157
 
127
- let isDevResources, isComponent, isExtension, isChart, isDemo, isLayout, isUtility;
158
+ let isDevResources, isComponent, isExtension, isChart, isPattern, isLayout, isUtility;
128
159
 
129
160
  const getSection = () => {
130
161
  return sources.some((source) => {
@@ -141,8 +172,8 @@ export const MDXTemplate = ({
141
172
  case "charts":
142
173
  isChart = true;
143
174
  return;
144
- case "demos":
145
- isDemo = true;
175
+ case "patterns":
176
+ isPattern = true;
146
177
  return;
147
178
  case "layouts":
148
179
  isLayout = true;
@@ -159,7 +190,6 @@ export const MDXTemplate = ({
159
190
  (e) => e.includes("pages") || e.includes("training")
160
191
  );
161
192
  const { pathname } = useLocation();
162
- const { katacodaLayout } = sources[0].Component.getPageData();
163
193
  let activeSource = pathname.replace(/\/$/, '').split('/').pop();
164
194
  // get summary text, convert to JSX to display above tabs on component pages
165
195
  const componentDasherized = id.split(' ').join('-').toLowerCase();
@@ -186,12 +216,19 @@ export const MDXTemplate = ({
186
216
  return "pf-m-light-100";
187
217
  }
188
218
  return "pf-m-light";
189
- } else if (isUtility || isDemo || isLayout || isComponent) {
219
+ } else if (isUtility || isPattern || isLayout || isComponent) {
190
220
  return "pf-m-light";
191
221
  }
192
222
  return "pf-m-light-100";
193
223
  };
194
224
 
225
+ const showTabs = (
226
+ (!isSinglePage && !hideTabName) ||
227
+ isComponent ||
228
+ isUtility ||
229
+ isPattern
230
+ );
231
+
195
232
  return (
196
233
  <React.Fragment>
197
234
  <PageGroup>
@@ -201,40 +238,74 @@ export const MDXTemplate = ({
201
238
  isWidthLimited
202
239
  >
203
240
  <TextContent>
204
- {!katacodaLayout && <Title headingLevel='h1' size='4xl' id="ws-page-title">{title}</Title>}
205
- {isComponent && summary && (<SummaryComponent />)}
241
+ <Flex alignItems={{ default: 'alignItemsCenter'}}>
242
+ <FlexItem>
243
+ <Title headingLevel='h1' size='4xl' id="ws-page-title">
244
+ {title}
245
+ </Title>
246
+ </FlexItem>
247
+ <FlexItem>
248
+ <Flex display={{ default: 'inlineFlex' }}>
249
+ {isDeprecated && (
250
+ <FlexItem spacer={{ default: 'spacerSm' }}>
251
+ <Tooltip content="Deprecated components are available for use but are no longer being maintained or enhanced.">
252
+ <Button isInline component="span" variant="link">
253
+ <Label color="grey">Deprecated</Label>
254
+ </Button>
255
+ </Tooltip>
256
+ </FlexItem>
257
+ )}
258
+ {isDemo && (
259
+ <FlexItem spacer={{ default: 'spacerSm' }}>
260
+ <Tooltip content="Demos show how multiple components can be used in a single design.">
261
+ <Button isInline component="span" variant="link">
262
+ <Label color="purple">Demo</Label>
263
+ </Button>
264
+ </Tooltip>
265
+ </FlexItem>
266
+ )}
267
+ {isBeta && (
268
+ <FlexItem spacer={{ default: 'spacerSm' }}>
269
+ <Tooltip content="This beta component is currently under review and is still open for further evolution.">
270
+ <Button isInline component="span" variant="link">
271
+ <Label color="blue">Beta</Label>
272
+ </Button>
273
+ </Tooltip>
274
+ </FlexItem>
275
+ )}
276
+ </Flex>
277
+ </FlexItem>
278
+ </Flex>
279
+ {isComponent && summary && (<SummaryComponent />)}
206
280
  </TextContent>
207
281
  </PageSection>
208
- {((!isSinglePage && !hideTabName) ||
209
- isComponent ||
210
- isUtility ||
211
- isDemo) && (
212
- <PageSection id="ws-sticky-nav-tabs" stickyOnBreakpoint={{'default':'top'}} type="tabs">
213
- <div className="pf-c-tabs pf-m-page-insets pf-m-no-border-bottom">
214
- <ul className="pf-c-tabs__list">
215
- {sourceKeys.map((source, index) => (
216
- <li
217
- key={source}
218
- className={css(
219
- 'pf-c-tabs__item',
220
- activeSource === source && 'pf-m-current'
221
- )}
222
- // Send clicked tab name for analytics
223
- onClick={() => trackEvent('tab_click', 'click_event', source.toUpperCase())}
224
- >
225
- <Link className="pf-c-tabs__link" to={`${path}${index === 0 ? '' : '/' + source}`}>
226
- {capitalize(source.replace('html', 'HTML').replace(/-/g, ' '))}
227
- </Link>
228
- </li>
229
- ))}
230
- </ul>
231
- </div>
232
- </PageSection>
282
+ { showTabs && (
283
+ <PageSection id="ws-sticky-nav-tabs" stickyOnBreakpoint={{'default':'top'}} type="tabs">
284
+ <div className="pf-v5-c-tabs pf-m-page-insets pf-m-no-border-bottom">
285
+ <ul className="pf-v5-c-tabs__list">
286
+ {sourceKeys.map((source, index) => (
287
+ <li
288
+ key={source}
289
+ className={css(
290
+ 'pf-v5-c-tabs__item',
291
+ activeSource === source && 'pf-m-current'
292
+ )}
293
+ // Send clicked tab name for analytics
294
+ onClick={() => trackEvent('tab_click', 'click_event', source.toUpperCase())}
295
+ >
296
+ <Link className="pf-v5-c-tabs__link" to={`${path}${index === 0 ? '' : '/' + source}`}>
297
+ {tabNames[source]}
298
+ </Link>
299
+ </li>
300
+ ))}
301
+ </ul>
302
+ </div>
303
+ </PageSection>
233
304
  )}
234
305
  <PageSection id="main-content" isFilled className="pf-m-light-100">
235
- {isSinglePage && <MDXChildTemplate {...sources[0]} />}
306
+ {isSinglePage && <MDXChildTemplate {...sources[0]} id={id}/>}
236
307
  {!isSinglePage && (
237
- <Router className="pf-u-h-100" primary={false}>
308
+ <Router className="pf-v5-u-h-100" primary={false}>
238
309
  {sources
239
310
  .map((source, index) => {
240
311
  source.index = index;
@@ -7,6 +7,8 @@ section: extensions
7
7
  id: My extension
8
8
  # Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
9
9
  source: design-guidelines
10
+ # Optional custom text to display in tab in place of source
11
+ tabName: My custom tab-name
10
12
  ---
11
13
 
12
14
  Design guidelines intro
@@ -7,6 +7,8 @@ section: extensions
7
7
  id: My extension
8
8
  # Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
9
9
  source: react
10
+ # Optional custom text to display in tab in place of source
11
+ tabName: My custom tab-name
10
12
  # If you use typescript, the name of the interface to display props for
11
13
  # These are found through the sourceProps function provdided in patternfly-docs.source.js
12
14
  # Can also pass object { component: string, source: string } allowing to specify the source
@@ -2,7 +2,7 @@
2
2
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
3
  <% urls.forEach(url => {%>
4
4
  <url>
5
- <loc>https://www.patternfly.org/v4<%=url%></loc>
5
+ <loc>https://www.patternfly.org<%=url%></loc>
6
6
  <changefreq>daily</changefreq>
7
7
  <priority>0.7</priority>
8
8
  </url>
package/versions.json CHANGED
@@ -5,26 +5,44 @@
5
5
  "date": "2022-02-08",
6
6
  "latest": true,
7
7
  "versions": {
8
- "@patternfly/patternfly": "5.0.0-alpha.13",
9
- "@patternfly/react-catalog-view-extension": "4.95.1",
10
- "@patternfly/react-charts": "7.0.0-alpha.3",
11
- "@patternfly/react-code-editor": "5.0.0-alpha.7",
12
- "@patternfly/react-core": "5.0.0-alpha.7",
13
- "@patternfly/react-drag-drop": "5.0.0-alpha.0",
14
- "@patternfly/react-icons": "5.0.0-alpha.2",
15
- "@patternfly/react-inline-edit-extension": "4.86.118",
16
- "@patternfly/react-log-viewer": "4.87.100",
17
- "@patternfly/react-styles": "5.0.0-alpha.2",
18
- "@patternfly/react-table": "5.0.0-alpha.7",
19
- "@patternfly/react-tokens": "5.0.0-alpha.2",
20
- "@patternfly/react-topology": "4.91.27",
8
+ "@patternfly/patternfly": "5.0.0-prerelease.10",
9
+ "@patternfly/react-charts": "7.0.0-prerelease.6",
10
+ "@patternfly/react-code-editor": "5.0.0-prerelease.13",
11
+ "@patternfly/react-core": "5.0.0-prerelease.13",
12
+ "@patternfly/react-icons": "5.0.0-prerelease.7",
13
+ "@patternfly/react-styles": "5.0.0-prerelease.5",
14
+ "@patternfly/react-table": "5.0.0-prerelease.13",
15
+ "@patternfly/react-tokens": "5.0.0-prerelease.5",
16
+ "@patternfly/react-catalog-view-extension": "5.0.0-alpha.2",
17
+ "@patternfly/react-console": "5.0.0-alpha.2",
18
+ "@patternfly/react-log-viewer": "5.0.0-alpha.2",
19
+ "@patternfly/react-topology": "5.0.0-alpha.2",
21
20
  "@patternfly/react-virtualized-extension": "4.88.113"
22
21
  }
23
22
  },
23
+ {
24
+ "name": "2023.02",
25
+ "date": "2022-03-27",
26
+ "versions": {
27
+ "@patternfly/patternfly": "4.224.4",
28
+ "@patternfly/react-catalog-view-extension": "4.96.0",
29
+ "@patternfly/react-charts": "6.94.19",
30
+ "@patternfly/react-code-editor": "4.82.115",
31
+ "@patternfly/react-console": "4.95.5",
32
+ "@patternfly/react-core": "4.276.8",
33
+ "@patternfly/react-icons": "4.93.6",
34
+ "@patternfly/react-inline-edit-extension": "4.86.122",
35
+ "@patternfly/react-log-viewer": "4.87.100",
36
+ "@patternfly/react-styles": "4.92.6",
37
+ "@patternfly/react-table": "4.113.0",
38
+ "@patternfly/react-tokens": "4.94.6",
39
+ "@patternfly/react-topology": "4.91.40",
40
+ "@patternfly/react-virtualized-extension": "4.88.115"
41
+ }
42
+ },
24
43
  {
25
44
  "name": "2023.01",
26
45
  "date": "2022-01-31",
27
- "latest": true,
28
46
  "versions": {
29
47
  "@patternfly/patternfly": "4.224.2",
30
48
  "@patternfly/react-catalog-view-extension": "4.95.1",
Binary file
Binary file
Binary file
Binary file
@@ -1,30 +0,0 @@
1
- /* Don't bother with specifity war */
2
- .ws-top-nav-link.pf-c-nav__link {
3
- color: var(--pf-global--BackgroundColor--light-100);
4
- }
5
-
6
- .ws-top-nav-link.pf-c-nav__link:active,
7
- .ws-top-nav-link.pf-c-nav__link:hover,
8
- .ws-top-nav-link.pf-c-nav__link.pf-m-current {
9
- color: var(--pf-global--BackgroundColor--dark-100);
10
- background-color: var(--pf-global--BackgroundColor--light-100);
11
- transition: .5s;
12
- }
13
-
14
- /* Don't bother with specifity war */
15
- .ws-top-nav-link.pf-c-nav__link::before {
16
- top: 0 !important;
17
- bottom: auto !important;
18
- right: 0 !important;
19
- left: 0 !important;
20
- border-color: var(--pf-global--link--Color--light--hover) !important;
21
- transform: scaleX(0);
22
- }
23
-
24
- /* Animate bar growing outwards */
25
- .ws-top-nav-link.pf-c-nav__link:active::before,
26
- .ws-top-nav-link.pf-c-nav__link:hover::before,
27
- .ws-top-nav-link.pf-c-nav__link.pf-m-current::before {
28
- transition: transform .5s;
29
- transform: scaleX(1);
30
- }
@@ -1,40 +0,0 @@
1
- ---
2
- id: Red Hat font
3
- section: developer-resources
4
- ---
5
-
6
- PR - [https://github.com/patternfly/patternfly/pull/4476](https://github.com/patternfly/patternfly/pull/4476)
7
-
8
- Available in [v4.161.0](https://github.com/patternfly/patternfly/releases/tag/prerelease-v4.161.0)
9
-
10
- ## Overview
11
-
12
- PatternFly has created opt-ins for `v4.0.2` of the [RedHatFont](https://github.com/RedHatOfficial/RedHatFont/). This is an update from `v2.x`. There are many new features in this update, including:
13
-
14
- - Variable fonts
15
- - New weights in Red Hat Display and Red Hat Text
16
- - Tabular figures (monospaced numbers) in Red Hat Display and Red Hat Text
17
- - Red Hat Mono typeface
18
- - Dropping support for IE11 (dropped the `.woff` format)
19
-
20
- ### Available Opt-ins
21
-
22
- #### `.pf-m-redhat-updated-font`
23
-
24
- Updates the Red Hat Text and Red Hat Display font stacks to `v4.0.2`. This should be a safe, seamless opt-in, with small improvements to glyph shape, kerning, metadata across the entire family of fonts. Potential concerns may be that this will remove support for IE11 by removing the `.woff` format support, and small layout shifts as result of the small improvements.
25
-
26
- #### `.pf-m-redhatmono-font`
27
-
28
- Updates the monospaced font stack to use the Red Hat Mono font. This opt-in can be combined with `.pf-m-redhat-updated-font`.
29
-
30
- #### `.pf-m-redhatVF-font`
31
-
32
- Updates the Red Hat Text, Red Hat Display, and Red Hat Mono font stacks to use the variable font files.
33
-
34
- #### `.pf-m-tabular-nums`
35
-
36
- This is a global class that can be applied to any element to enable monospaced numbers on that element and its children.
37
-
38
- ### Using opt-in classes
39
-
40
- To opt-in to any of the new fonts (`.pf-m-redhat-updated-font`, `.pf-m-redhatmono-font`, and `.pf-m-redhatVF-font`), add the opt-in class to the `<body>` tag of your application. To opt-in to monospaced numbers globally across your application, apply `.pf-m-tabular-nums` to any element that wraps your entire application (eg, `<body>`, `<div id="root">`, `<div class="pf-c-page">`, etc). To opt-in to monospaced numbers on a particular element and its children, add the class to that element itself.