| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
PatternFly-React preview: https://patternfly-react-pr-2563.surge.sh |
Sorry, something went wrong.
There was a problem hiding this comment.
I got to relearn how exactly how Gatsby renders html.js recently. Thank goodness we don't have to worry about how it statically renders it :)
Sorry, something went wrong.
| /> | ||
| {props.headComponents} | ||
| </head> | ||
| <body {...props.bodyAttributes} className="pf-m-redhat-font"> |
There was a problem hiding this comment.
It's possible to globally include SASS that adds that styling to body, but I like this better to give us more control of the template in the future.
Sorry, something went wrong.
There was a problem hiding this comment.
I think for now we don't really need to add a template here, this docs site isn't going to last forever anyway once we can move to just using pf.org. If we use react-helmet, it alleviates the need for this entire file. @redallen
Sorry, something went wrong.
| All css related to each component is provided within it. There is no component level CSS to import. | ||
|
|
||
| # Applying Red Hat Fonts (Optional) | ||
| If you would like to add Red Hat font instead of Overpass, simply add the class `.pf-m-redhat-font` to an element that wraps your application (ideally `<html>` or `<body>`) to adopt the CSS changes that introduce the Red Hat font into PatternFly. |
There was a problem hiding this comment.
Small change, wdyt?
| If you would like to add Red Hat font instead of Overpass, simply add the class `.pf-m-redhat-font` to an element that wraps your application (ideally `<html>` or `<body>`) to adopt the CSS changes that introduce the Red Hat font into PatternFly. | |
| If you would like to use Red Hat fonts instead of Overpass, simply add the class `.pf-m-redhat-font` to an element that wraps your application (ideally `<html>` or `<body>`) to adopt the CSS changes that introduce the Red Hats font into PatternFly. |
Sorry, something went wrong.
There was a problem hiding this comment.
oops. I made a typo
| If you would like to add Red Hat font instead of Overpass, simply add the class `.pf-m-redhat-font` to an element that wraps your application (ideally `<html>` or `<body>`) to adopt the CSS changes that introduce the Red Hat font into PatternFly. | |
| If you would like to use Red Hat fonts instead of Overpass, simply add the class `.pf-m-redhat-font` to an element that wraps your application (ideally `<html>` or `<body>`) to adopt the CSS changes that introduce the Red Hat fonts into PatternFly. |
Sorry, something went wrong.
There was a problem hiding this comment.
Just some linter nitpicking. You can run yarn lint:js to verify and/or yarn lint:fix to fix the auto-fixable ones.
Sorry, something went wrong.
| /> | ||
| {props.headComponents} | ||
| </head> | ||
| <body {...props.bodyAttributes} className="pf-m-redhat-font"> |
There was a problem hiding this comment.
We are using react-helmet in other places to alleviate the need for this - you can add this instead (only the body element needs to be added, other code added for reference so you can find it):
in react-docs/src/templates/sidebarLayout.js
<Helmet> <html lang="en-US" /> <meta charSet="utf-8" /> <meta name="description" content="PatternFly React Documentation" /> <meta name="keywords" content="React, PatternFly, Red Hat" /> <link rel="icon" type="image/x-icon" href="/favicon.ico" /> <body className='pf-m-redhat-font' /> </Helmet>
Sorry, something went wrong.
There was a problem hiding this comment.
I followed these instructions from the Gatsby documentations. Are you saying that I do not need to copy the html.js file?
https://www.gatsbyjs.org/docs/custom-html/
Sorry, something went wrong.
There was a problem hiding this comment.
No - the html.js file isn't needed for just adding a class on the body tag, react-helmet supports that with a single line change to sidebarLayout
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2563.surge.sh |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2563.surge.sh |
Sorry, something went wrong.
There was a problem hiding this comment.
🎯 Very precise. 🎯
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm!
Sorry, something went wrong.
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
#1936
What:
Additional issues: