Skip to content

Commit 4e44bdf

Browse files
committed
chore(docs): updatin spacin
1 parent 7d9a477 commit 4e44bdf

File tree

7 files changed

+35
-23
lines changed

7 files changed

+35
-23
lines changed

packages/documentation-framework/components/autoLinkHeader/autoLinkHeader.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
.ws-heading-anchor {
66
color: var(--pf-t--global--icon--color--regular);
7-
transform: translate(calc(-100% - var(--pf-t--global--spacer--xs)), -50%);
7+
transform: translate(-100%, -50%);
88
opacity: 0;
99
position: absolute;
1010
left: 0;
1111
top: 50%;
12+
padding-inline-end: var(--pf-t--global--spacer--xs);
1213
}
1314

1415
.ws-heading-anchor-icon {

packages/documentation-framework/components/autoLinkHeader/autoLinkHeader.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ export const AutoLinkHeader = ({
1515
const slug = id || slugger(children);
1616

1717
return (
18-
<Flex alignItems={{ default: 'alignItemsCenter'}} spaceItems={{ default: "spaceItemsSm" }}>
18+
<Content
19+
id={slug}
20+
component={headingLevel}
21+
className={css('ws-heading', className)}
22+
tabIndex={-1}
23+
isEditorial
24+
>
25+
<Flex alignItems={{ default: 'alignItemsCenter'}} spaceItems={{ default: "spaceItemsSm" }} className={`ws-autolink-header ws-autolink-header-${headingLevel}`}>
1926
<FlexItem>
20-
<Content
21-
id={slug}
22-
component={headingLevel}
23-
className={css('ws-heading', className)}
24-
tabIndex={-1}
25-
isEditorial
26-
>
27-
<Link href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
28-
<LinkIcon className="ws-heading-anchor-icon" style={{ verticalAlign: 'middle' }} />
29-
</Link>
30-
{children}
31-
</Content>
27+
<Link href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
28+
<LinkIcon className="ws-heading-anchor-icon" style={{ verticalAlign: 'middle' }} />
29+
</Link>
30+
{children}
3231
</FlexItem>
3332
{metaText && <FlexItem>{metaText}</FlexItem>}
3433
</Flex>
34+
</Content>
3535
)
3636
};

packages/documentation-framework/components/example/example.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
--ws-code-editor--tooltip--MaxWidth: 16ch;
33
}
44

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

910
.ws-code-editor-control {
@@ -86,3 +87,7 @@
8687
opacity: 0.8;
8788
box-shadow: var(--pf-t--global--box-shadow--sm);
8889
}
90+
91+
.ws-example-toolbar {
92+
margin-block-end: var(--pf-t--global--spacer--lg);
93+
}

packages/documentation-framework/components/example/example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export const Example = ({
294294
</AutoLinkHeader>
295295
{children}
296296
</StackItem>
297-
<StackItem>
297+
<StackItem className="ws-example-preview">
298298
{isFullscreen ? (
299299
<div>
300300
<a
@@ -323,7 +323,7 @@ export const Example = ({
323323
</div>
324324
)}
325325
</StackItem>
326-
<StackItem>
326+
<StackItem className="ws-example-toolbar">
327327
<ExampleToolbar
328328
lang={lang}
329329
isFullscreen={isFullscreen}

packages/documentation-framework/templates/mdx.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
.pf-v6-l-stack > p.pf-v6-c-content--p.ws-p {
2-
margin: 0;
1+
.ws-content.pf-v6-l-stack > [class*="pf-v6-c-content"] {
2+
margin-bottom: 0;
3+
}
4+
5+
.ws-content {
6+
max-width: 825px;
37
}
48

59
.ws-code {
@@ -23,3 +27,7 @@
2327
.ws-back-to-top {
2428
z-index: var(--pf-t--global--z-index--2xl);
2529
}
30+
31+
.ws-autolink-header:not(:first-child) {
32+
margin-top: var(--pf-t--global--spacer--md);
33+
}

packages/documentation-framework/templates/mdx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
154154
{toc.length > 1 && <TableOfContents items={toc} />}
155155
<Stack
156156
hasGutter
157-
style={{ ...(source !== 'landing-pages' && { maxWidth: '825px' }) }}
157+
className={(source !== 'landing-pages' && 'ws-content')}
158158
>
159159
{InlineAlerts}
160160
<Component />

packages/documentation-site/patternfly-docs/content/design-guidelines/usage-and-behavior/usage-and-behavior.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ id: Usage and behavior
33
section: design-foundations
44
---
55

6-
# PatternFly component usage and behavior guidelines
7-
86
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.
97

108
## Displaying structured data

0 commit comments

Comments
 (0)