-
Notifications
You must be signed in to change notification settings - Fork 377
fullscreen examples should have 100% height #2670
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8e6e617
fullscreen examples should have 100% height
jschuler 7c4f424
remove debugger
jschuler 7634f23
Merge remote-tracking branch 'upstream/master' into fullscreen-height
jschuler 88ee9bd
add paragraph to docs about height and improve the markdown presentat…
jschuler b24123d
fix linting
jschuler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,256 @@ | ||
| .theme-pf-c-content { | ||
| --pf-c-content--MarginBottom: var(--pf-global--spacer--md); | ||
| --pf-c-content--LineHeight: var(--pf-global--LineHeight--md); | ||
| --pf-c-content--FontSize: var(--pf-global--FontSize--md); | ||
| --pf-c-content--FontWeight: var(--pf-global--FontWeight--normal); | ||
| --pf-c-content--Color: var(--pf-global--Color--100); | ||
| --pf-c-content--heading--FontFamily: var(--pf-global--FontFamily--heading--sans-serif); | ||
| --pf-c-content--h1--MarginTop: var(--pf-global--spacer--lg); | ||
| --pf-c-content--h1--MarginBottom: var(--pf-global--spacer--sm); | ||
| --pf-c-content--h1--LineHeight: var(--pf-global--LineHeight--sm); | ||
| --pf-c-content--h1--FontSize: var(--pf-global--FontSize--2xl); | ||
| --pf-c-content--h1--FontWeight: var(--pf-global--FontWeight--normal); | ||
| --pf-c-content--h2--MarginTop: var(--pf-global--spacer--lg); | ||
| --pf-c-content--h2--MarginBottom: var(--pf-global--spacer--sm); | ||
| --pf-c-content--h2--LineHeight: var(--pf-global--LineHeight--sm); | ||
| --pf-c-content--h2--FontSize: var(--pf-global--FontSize--xl); | ||
| --pf-c-content--h2--FontWeight: var(--pf-global--FontWeight--normal); | ||
| --pf-c-content--h3--MarginTop: var(--pf-global--spacer--lg); | ||
| --pf-c-content--h3--MarginBottom: var(--pf-global--spacer--sm); | ||
| --pf-c-content--h3--LineHeight: var(--pf-global--LineHeight--md); | ||
| --pf-c-content--h3--FontSize: var(--pf-global--FontSize--lg); | ||
| --pf-c-content--h3--FontWeight: var(--pf-global--FontWeight--normal); | ||
| --pf-c-content--h4--MarginTop: var(--pf-global--spacer--lg); | ||
| --pf-c-content--h4--MarginBottom: var(--pf-global--spacer--sm); | ||
| --pf-c-content--h4--LineHeight: var(--pf-global--LineHeight--md); | ||
| --pf-c-content--h4--FontSize: var(--pf-global--FontSize--md); | ||
| --pf-c-content--h4--FontWeight: var(--pf-global--FontWeight--semi-bold); | ||
| --pf-c-content--h5--MarginTop: var(--pf-global--spacer--lg); | ||
| --pf-c-content--h5--MarginBottom: var(--pf-global--spacer--sm); | ||
| --pf-c-content--h5--LineHeight: var(--pf-global--LineHeight--md); | ||
| --pf-c-content--h5--FontSize: var(--pf-global--FontSize--md); | ||
| --pf-c-content--h5--FontWeight: var(--pf-global--FontWeight--semi-bold); | ||
| --pf-c-content--h6--MarginTop: var(--pf-global--spacer--lg); | ||
| --pf-c-content--h6--MarginBottom: var(--pf-global--spacer--sm); | ||
| --pf-c-content--h6--LineHeight: var(--pf-global--LineHeight--md); | ||
| --pf-c-content--h6--FontSize: var(--pf-global--FontSize--md); | ||
| --pf-c-content--h6--FontWeight: var(--pf-global--FontWeight--semi-bold); | ||
| --pf-c-content--small--MarginBottom: var(--pf-global--spacer--md); | ||
| --pf-c-content--small--LineHeight: var(--pf-global--LineHeight--md); | ||
| --pf-c-content--small--FontSize: var(--pf-global--FontSize--sm); | ||
| --pf-c-content--small--Color: var(--pf-global--Color--200); | ||
| --pf-c-content--small--FontWeight: var(--pf-global--FontWeight--semi-bold); | ||
| --pf-c-content--a--Color: var(--pf-global--link--Color); | ||
| --pf-c-content--a--TextDecoration: var(--pf-global--link--TextDecoration); | ||
| --pf-c-content--a--hover--Color: var(--pf-global--link--Color--hover); | ||
| --pf-c-content--a--hover--TextDecoration: var(--pf-global--link--TextDecoration--hover); | ||
| --pf-c-content--blockquote--PaddingTop: var(--pf-global--spacer--md); | ||
| --pf-c-content--blockquote--PaddingRight: var(--pf-global--spacer--md); | ||
| --pf-c-content--blockquote--PaddingBottom: var(--pf-global--spacer--md); | ||
| --pf-c-content--blockquote--PaddingLeft: var(--pf-global--spacer--md); | ||
| --pf-c-content--blockquote--FontWeight: var(--pf-global--FontWeight--light); | ||
| --pf-c-content--blockquote--Color: var(--pf-global--Color--200); | ||
| --pf-c-content--blockquote--BorderLeftColor: var(--pf-global--BorderColor--100); | ||
| --pf-c-content--blockquote--BorderLeftWidth: var(--pf-global--BorderWidth--lg); | ||
| --pf-c-content--ol--PaddingLeft: var(--pf-global--spacer--lg); | ||
| --pf-c-content--ol--MarginTop: var(--pf-global--spacer--md); | ||
| --pf-c-content--ol--MarginLeft: var(--pf-global--spacer--lg); | ||
| --pf-c-content--ol--nested--MarginTop: var(--pf-global--spacer--sm); | ||
| --pf-c-content--ol--nested--MarginLeft: var(--pf-global--spacer--sm); | ||
| --pf-c-content--ul--PaddingLeft: var(--pf-global--spacer--lg); | ||
| --pf-c-content--ul--MarginTop: var(--pf-global--spacer--md); | ||
| --pf-c-content--ul--MarginLeft: var(--pf-global--spacer--lg); | ||
| --pf-c-content--ul--nested--MarginTop: var(--pf-global--spacer--sm); | ||
| --pf-c-content--ul--nested--MarginLeft: var(--pf-global--spacer--sm); | ||
| --pf-c-content--ul--ListStyle: var(--pf-global--ListStyle); | ||
| --pf-c-content--li--MarginTop: var(--pf-global--spacer--sm); | ||
| --pf-c-content--dl--ColumnGap: var(--pf-global--spacer--2xl); | ||
| --pf-c-content--dl--RowGap: var(--pf-global--spacer--md); | ||
| --pf-c-content--dt--FontWeight: var(--pf-global--FontWeight--semi-bold); | ||
| --pf-c-content--dt--MarginTop: var(--pf-global--spacer--md); | ||
| --pf-c-content--dt--sm--MarginTop: 0; | ||
| --pf-c-content--hr--Height: var(--pf-global--BorderWidth--sm); | ||
| --pf-c-content--hr--BackgroundColor: var(--pf-global--BorderColor--100); | ||
| } | ||
| [data-pf-content] { | ||
| font-size: var(--pf-c-content--FontSize); | ||
| line-height: var(--pf-c-content--LineHeight); | ||
| color: var(--pf-c-content--Color); | ||
| } | ||
| .theme-pf-c-content a[data-pf-content] { | ||
| color: var(--pf-c-content--a--Color); | ||
| text-decoration: var(--pf-c-content--a--TextDecoration); | ||
| } | ||
| .theme-pf-c-content a[data-pf-content]:hover { | ||
| --pf-c-content--a--Color: var(--pf-c-content--a--hover--Color); | ||
| --pf-c-content--a--TextDecoration: var(--pf-c-content--a--hover--TextDecoration); | ||
| } | ||
| .theme-pf-c-content li[data-pf-content] + li { | ||
| margin-top: var(--pf-c-content--li--MarginTop); | ||
| } | ||
| .theme-pf-c-content p[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content dl[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content ol[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content ul[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content blockquote[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content small[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content pre[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content table[data-pf-content]:not(:last-child), | ||
| .theme-pf-c-content hr[data-pf-content]:not(:last-child) { | ||
| margin-bottom: var(--pf-c-content--MarginBottom); | ||
| } | ||
| .theme-pf-c-content h1[data-pf-content], | ||
| .theme-pf-c-content h2[data-pf-content], | ||
| .theme-pf-c-content h3[data-pf-content], | ||
| .theme-pf-c-content h4[data-pf-content], | ||
| .theme-pf-c-content h5[data-pf-content], | ||
| .theme-pf-c-content h6[data-pf-content] { | ||
| margin: 0; | ||
| font-family: var(--pf-c-content--heading--FontFamily); | ||
| } | ||
| .theme-pf-c-content ol[data-pf-content], | ||
| .theme-pf-c-content ul[data-pf-content] { | ||
| margin: 0; | ||
| } | ||
| .theme-pf-c-content h1[data-pf-content] { | ||
| margin-bottom: var(--pf-c-content--h1--MarginBottom); | ||
| font-size: var(--pf-c-content--h1--FontSize); | ||
| font-weight: var(--pf-c-content--h1--FontWeight); | ||
| line-height: var(--pf-c-content--h1--LineHeight); | ||
| } | ||
| .theme-pf-c-content h1[data-pf-content]:not(:first-child) { | ||
| margin-top: var(--pf-c-content--h1--MarginTop); | ||
| } | ||
| .theme-pf-c-content h2[data-pf-content] { | ||
| margin-bottom: var(--pf-c-content--h2--MarginBottom); | ||
| font-size: var(--pf-c-content--h2--FontSize); | ||
| font-weight: var(--pf-c-content--h2--FontWeight); | ||
| line-height: var(--pf-c-content--h2--LineHeight); | ||
| } | ||
| .theme-pf-c-content h2[data-pf-content]:not(:first-child) { | ||
| margin-top: var(--pf-c-content--h2--MarginTop); | ||
| } | ||
| .theme-pf-c-content h3[data-pf-content] { | ||
| margin-bottom: var(--pf-c-content--h3--MarginBottom); | ||
| font-size: var(--pf-c-content--h3--FontSize); | ||
| font-weight: var(--pf-c-content--h3--FontWeight); | ||
| line-height: var(--pf-c-content--h3--LineHeight); | ||
| } | ||
| .theme-pf-c-content h3[data-pf-content]:not(:first-child) { | ||
| margin-top: var(--pf-c-content--h3--MarginTop); | ||
| } | ||
| .theme-pf-c-content h4[data-pf-content] { | ||
| margin-bottom: var(--pf-c-content--h4--MarginBottom); | ||
| font-size: var(--pf-c-content--h4--FontSize); | ||
| font-weight: var(--pf-c-content--h4--FontWeight); | ||
| line-height: var(--pf-c-content--h4--LineHeight); | ||
| } | ||
| .theme-pf-c-content h4[data-pf-content]:not(:first-child) { | ||
| margin-top: var(--pf-c-content--h4--MarginTop); | ||
| } | ||
| .theme-pf-c-content h5[data-pf-content] { | ||
| margin-bottom: var(--pf-c-content--h5--MarginBottom); | ||
| font-size: var(--pf-c-content--h5--FontSize); | ||
| font-weight: var(--pf-c-content--h5--FontWeight); | ||
| line-height: var(--pf-c-content--h5--LineHeight); | ||
| } | ||
| .theme-pf-c-content h5[data-pf-content]:not(:first-child) { | ||
| margin-top: var(--pf-c-content--h5--MarginTop); | ||
| } | ||
| .theme-pf-c-content h6[data-pf-content] { | ||
| margin-bottom: var(--pf-c-content--h6--MarginBottom); | ||
| font-size: var(--pf-c-content--h6--FontSize); | ||
| font-weight: var(--pf-c-content--h6--FontWeight); | ||
| line-height: var(--pf-c-content--h6--LineHeight); | ||
| } | ||
| .theme-pf-c-content h6[data-pf-content]:not(:first-child) { | ||
| margin-top: var(--pf-c-content--h6--MarginTop); | ||
| } | ||
| .theme-pf-c-content small[data-pf-content] { | ||
| display: block; | ||
| font-size: var(--pf-c-content--small--FontSize); | ||
| line-height: var(--pf-c-content--small--LineHeight); | ||
| color: var(--pf-c-content--small--Color); | ||
| } | ||
| .theme-pf-c-content small[data-pf-content]:not(:last-child) { | ||
| margin-bottom: var(--pf-c-content--small--MarginBottom); | ||
| } | ||
| .theme-pf-c-content blockquote[data-pf-content] { | ||
| padding: var(--pf-c-content--blockquote--PaddingTop) var(--pf-c-content--blockquote--PaddingRight) | ||
| var(--pf-c-content--blockquote--PaddingBottom) var(--pf-c-content--blockquote--PaddingLeft); | ||
| font-weight: var(--pf-c-content--blockquote--FontWeight); | ||
| color: var(--pf-c-content--blockquote--Color); | ||
| border-left: var(--pf-c-content--blockquote--BorderLeftWidth) solid var(--pf-c-content--blockquote--BorderLeftColor); | ||
| } | ||
| .theme-pf-c-content hr[data-pf-content] { | ||
| height: var(--pf-c-content--hr--Height); | ||
| background-color: var(--pf-c-content--hr--BackgroundColor); | ||
| border: none; | ||
| } | ||
| .theme-pf-c-content ol[data-pf-content] { | ||
| padding-left: var(--pf-c-content--ol--PaddingLeft); | ||
| margin-top: var(--pf-c-content--ol--MarginTop); | ||
| margin-left: var(--pf-c-content--ol--MarginLeft); | ||
| } | ||
| .theme-pf-c-content ol[data-pf-content] ul { | ||
| --pf-c-content--ul--MarginTop: var(--pf-c-content--ul--nested--MarginTop); | ||
| --pf-c-content--ul--MarginLeft: var(--pf-c-content--ul--nested--MarginLeft); | ||
| } | ||
| .theme-pf-c-content ol[data-pf-content] ol { | ||
| --pf-c-content--ol--MarginTop: var(--pf-c-content--ol--nested--MarginTop); | ||
| --pf-c-content--ol--MarginLeft: var(--pf-c-content--ol--nested--MarginLeft); | ||
| } | ||
| .theme-pf-c-content ul[data-pf-content] { | ||
| padding-left: var(--pf-c-content--ul--PaddingLeft); | ||
| margin-top: var(--pf-c-content--ul--MarginTop); | ||
| margin-left: var(--pf-c-content--ul--MarginLeft); | ||
| list-style: var(--pf-c-content--ul--ListStyle); | ||
| } | ||
| .theme-pf-c-content ul[data-pf-content] ul { | ||
| --pf-c-content--ul--MarginTop: var(--pf-c-content--ul--nested--MarginTop); | ||
| --pf-c-content--ul--MarginLeft: var(--pf-c-content--ul--nested--MarginLeft); | ||
| } | ||
| .theme-pf-c-content ul[data-pf-content] ol { | ||
| --pf-c-content--ol--MarginTop: var(--pf-c-content--ol--nested--MarginTop); | ||
| --pf-c-content--ol--MarginLeft: var(--pf-c-content--ol--nested--MarginLeft); | ||
| } | ||
| .theme-pf-c-content dl[data-pf-content] { | ||
| display: grid; | ||
| grid-template-columns: 1fr; | ||
| } | ||
| @media screen and (min-width: 576px) { | ||
| .theme-pf-c-content dl[data-pf-content] { | ||
| grid-template: auto / auto 1fr; | ||
| grid-column-gap: var(--pf-c-content--dl--ColumnGap); | ||
| grid-row-gap: var(--pf-c-content--dl--RowGap); | ||
| } | ||
| } | ||
| .theme-pf-c-content dt[data-pf-content] { | ||
| font-weight: var(--pf-c-content--dt--FontWeight); | ||
| } | ||
| .theme-pf-c-content dt[data-pf-content]:not(:first-child) { | ||
| margin-top: var(--pf-c-content--dt--MarginTop); | ||
| } | ||
| @media screen and (min-width: 576px) { | ||
| .theme-pf-c-content dt[data-pf-content]:not(:first-child) { | ||
| --pf-c-content--dt--MarginTop: var(--pf-c-content--dt--sm--MarginTop); | ||
| } | ||
| } | ||
| @media screen and (min-width: 576px) { | ||
| .theme-pf-c-content dt[data-pf-content] { | ||
| grid-column: 1; | ||
| } | ||
| } | ||
| @media screen and (min-width: 576px) { | ||
| .theme-pf-c-content dd[data-pf-content] { | ||
| grid-column: 2; | ||
| } | ||
| } | ||
|
|
||
| .pf-m-redhat-font .theme-pf-c-content { | ||
| --pf-c-content--h2--LineHeight: var(--pf-global--LineHeight--md); | ||
| --pf-c-content--blockquote--FontWeight: var(--pf-global--FontWeight--normal); | ||
| --pf-c-content--h4--FontWeight: var(--pf-global--FontWeight--normal); | ||
| --pf-c-content--h5--FontWeight: var(--pf-global--FontWeight--normal); | ||
| --pf-c-content--h6--FontWeight: var(--pf-global--FontWeight--normal); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #___gatsby { | ||
| height: 100%; | ||
| } | ||
|
|
||
| #___gatsby > div { | ||
| height: 100%; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,15 +3,27 @@ import PropTypes from 'prop-types'; | |
| import { graphql } from 'gatsby'; | ||
| import SidebarLayout from './sidebarLayout'; | ||
| import { CSSVars, PropsTable, LiveEdit } from '../components/componentDocs'; | ||
| import { Title, PageSection } from '@patternfly-safe/react-core'; | ||
| import { Title, PageSection, Text, TextList, TextListItem } from '@patternfly-safe/react-core'; | ||
| import { MDXProvider } from '@mdx-js/react'; | ||
| import { MDXRenderer } from '../components/mdx-renderer'; | ||
|
|
||
| const components = { | ||
| wrapper: componentProps => <div className="theme-pf-c-content" {...componentProps} />, | ||
| code: LiveEdit, | ||
| pre: React.Fragment | ||
| pre: React.Fragment, | ||
| p: componentProps => <Text component="p" {...componentProps} />, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We (eventually) need to make sure every HTML tag is covered here that doesn't look right inside |
||
| blockquote: componentProps => <Text component="blockquote" {...componentProps} />, | ||
| a: componentProps => <Text component="a" {...componentProps} />, | ||
| ul: componentProps => <TextList {...componentProps} />, | ||
| ol: componentProps => <TextList component="ol" {...componentProps} />, | ||
| li: componentProps => <TextListItem {...componentProps} />, | ||
| inlineCode: componentProps => <strong {...componentProps} /> | ||
| }; | ||
|
|
||
| for (let i = 1; i <= 6; i++) { | ||
| components[`h${i}`] = componentProps => <Text component={`h${i}`} {...componentProps} />; | ||
| } | ||
|
|
||
| const MdxTemplate = ({ data }) => { | ||
| const { cssPrefix } = data.mdx.frontmatter; | ||
| const section = data.mdx.frontmatter.section || 'component'; | ||
|
|
@@ -20,7 +32,7 @@ const MdxTemplate = ({ data }) => { | |
| return ( | ||
| <SidebarLayout> | ||
| <PageSection> | ||
| <Title size="4xl"> | ||
| <Title size="4xl" className="pf-u-mb-lg"> | ||
| {data.mdx.frontmatter.title} {section.indexOf('-') === -1 ? section : ''} | ||
| </Title> | ||
| <MDXProvider components={components}> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.