Skip to content
Open
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 @@ -4,11 +4,12 @@

.ws-heading-anchor {
color: var(--pf-t--global--icon--color--regular);
transform: translate(calc(-100% - var(--pf-t--global--spacer--xs)), -50%);
transform: translate(-100%, -50%);
opacity: 0;
position: absolute;
left: 0;
top: 50%;
padding-inline-end: var(--pf-t--global--spacer--xs);
}

.ws-heading-anchor-icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ export const AutoLinkHeader = ({
const slug = id || slugger(children);

return (
<Flex alignItems={{ default: 'alignItemsCenter'}} spaceItems={{ default: "spaceItemsSm" }}>
<Content
id={slug}
component={headingLevel}
className={css('ws-heading', className)}
tabIndex={-1}
isEditorial
>
<Flex alignItems={{ default: 'alignItemsCenter'}} spaceItems={{ default: "spaceItemsSm" }} className={`ws-autolink-header ws-autolink-header-${headingLevel}`}>
<FlexItem>
<Content
id={slug}
component={headingLevel}
className={css('ws-heading', className)}
tabIndex={-1}
isEditorial
>
<Link href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon className="ws-heading-anchor-icon" style={{ verticalAlign: 'middle' }} />
</Link>
{children}
</Content>
<Link href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon className="ws-heading-anchor-icon" style={{ verticalAlign: 'middle' }} />
</Link>
{children}
</FlexItem>
{metaText && <FlexItem>{metaText}</FlexItem>}
</Flex>
</Content>
)
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
--ws-code-editor--tooltip--MaxWidth: 16ch;
}

.ws-code-editor:not(.ws-example-code-expanded) > .pf-v6-c-code-editor__header::before {
--pf-v6-c-code-editor__header--before--BorderBottomWidth: 0;
.ws-code-editor {
--pf-v6-c-code-editor__header-content--PaddingInlineStart: 0;
--pf-v6-c-code-editor__header-content--PaddingInlineEnd: 0;
}

.ws-code-editor-control {
Expand Down Expand Up @@ -86,3 +87,7 @@
opacity: 0.8;
box-shadow: var(--pf-t--global--box-shadow--sm);
}

.ws-example-toolbar {
margin-block-end: var(--pf-t--global--spacer--lg);
}
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export const Example = ({
</AutoLinkHeader>
{children}
</StackItem>
<StackItem>
<StackItem className="ws-example-preview">
{isFullscreen ? (
<div>
<a
Expand Down Expand Up @@ -323,7 +323,7 @@ export const Example = ({
</div>
)}
</StackItem>
<StackItem>
<StackItem className="ws-example-toolbar">
<ExampleToolbar
lang={lang}
isFullscreen={isFullscreen}
Expand Down
12 changes: 10 additions & 2 deletions packages/documentation-framework/templates/mdx.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
p.pf-v6-c-content--p.ws-p {
margin: 0;
.ws-content.pf-v6-l-stack > [class*="pf-v6-c-content"] {
margin-bottom: 0;
}

.ws-content {
max-width: 825px;
}

.ws-code {
Expand All @@ -24,6 +28,10 @@ p.pf-v6-c-content--p.ws-p {
z-index: var(--pf-t--global--z-index--2xl);
}

.ws-autolink-header:not(:first-child) {
margin-top: var(--pf-t--global--spacer--md);
}

.ws-example-page-wrapper {
max-width: min(100%, 825px);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ id: Usage and behavior
section: design-foundations
---

# PatternFly component usage and behavior guidelines

As you design with PatternFly, you might encounter common use cases where multiple components could be used. These guidelines outline which component to use in these situations and shares where to find more detailed usage guidelines.

## Displaying structured data
Expand Down