Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(demos): fix typography on demo pages #1083

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class PageLayoutDefaultNav extends React.Component {
isManagedSidebar
skipToContent={PageSkipToContent}
breadcrumb={PageBreadcrumb}
className="pf4-site-demo-typography"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything under _repos will get overwritten when newer patternfly-react and core versions are pulled in. So this would only be a temporary solution. Perhaps we can add a class identifier upstream?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jschuler this is really only necessary until PatternFly moves over to using the Red Hat typography (which will then match the rest of PatternFly.org). I don't know the timeline for that (I couldn't find an issue in the patternfly/patternfly-next repo), but it probably wouldn't make sense to put an identifier upstream.

Copy link
Member

@christiemolloy christiemolloy May 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mindreeper2420 there is a PR up in pf next currently that adds an option to use the new font family: patternfly/patternfly#1813 .. I dont know how long until it will be merged but I can check with @mcoker

>
<PageSection variant={PageSectionVariants.light}>
<TextContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class PageLayoutExpandableNav extends React.Component {
isManagedSidebar
skipToContent={PageSkipToContent}
breadcrumb={PageBreadcrumb}
className="pf4-site-demo-typography"
>
<PageSection variant={PageSectionVariants.light}>
<TextContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class PageLayoutGroupsNav extends React.Component {

return (
<React.Fragment>
<Page header={Header} sidebar={Sidebar} isManagedSidebar skipToContent={PageSkipToContent}>
<Page header={Header} sidebar={Sidebar} isManagedSidebar skipToContent={PageSkipToContent} className="pf4-site-demo-typography">
<PageSection variant={PageSectionVariants.light}>
<TextContent>
<Text component="h1">Main Title</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class PageLayoutHorizontalNav extends React.Component {

return (
<React.Fragment>
<Page header={Header} skipToContent={PageSkipToContent} breadcrumb={PageBreadcrumb}>
<Page header={Header} skipToContent={PageSkipToContent} breadcrumb={PageBreadcrumb} className="pf4-site-demo-typography">
<PageSection variant={PageSectionVariants.light}>
<TextContent>
<Text component="h1">Main Title</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class PageLayoutManualNav extends React.Component {

return (
<React.Fragment>
<Page header={Header} sidebar={Sidebar} onPageResize={this.onPageResize} skipToContent={PageSkipToContent}>
<Page header={Header} sidebar={Sidebar} onPageResize={this.onPageResize} skipToContent={PageSkipToContent} className="pf4-site-demo-typography">
<PageSection variant={PageSectionVariants.light}>
<TextContent>
<Text component="h1">Main Title</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class PageLayoutSimpleNav extends React.Component {

return (
<React.Fragment>
<Page header={Header} sidebar={Sidebar} isManagedSidebar skipToContent={PageSkipToContent}>
<Page header={Header} sidebar={Sidebar} isManagedSidebar skipToContent={PageSkipToContent} className="pf4-site-demo-typography">
<PageSection variant={PageSectionVariants.light}>
<TextContent>
<Text component="h1">Main Title</Text>
Expand Down
6 changes: 6 additions & 0 deletions packages/patternfly-4/src/templates/template.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
font-family: var(--pf-global--FontFamily--sans-serif);
}

.pf4-site-demo-typography,
.pf4-site-demo-typography *,
.pf4-site-demo-typography .pf-c-content * {
font-family: var(--pf-global--FontFamily--sans-serif);
}

.pageSectionStyles {
padding-top: 32px;
padding-right: 64px;
Expand Down