Skip to content

Commit

Permalink
[docs] fix regressions (#2199)
Browse files Browse the repository at this point in the history
* give ModifierTable its own class. fixes #2163

* move pt-running-text back to docs-section

* fix tree icon
  • Loading branch information
giladgray authored Mar 6, 2018
1 parent 2c72a5c commit 8396c0d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 22 deletions.
6 changes: 5 additions & 1 deletion packages/core/src/components/tree/_tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $tree-icon-spacing: ($tree-row-height - $pt-icon-size-standard) / 2 !default;
.pt-tree-node-caret-none {
position: relative;
min-width: $pt-grid-size * 3;
// override default icon styles, which appear first for some reason
// CSS API: override default icon styles, which appear first for some reason
line-height: $tree-row-height !important; // stylelint-disable-line declaration-no-important
}

Expand All @@ -99,6 +99,10 @@ $tree-icon-spacing: ($tree-row-height - $pt-icon-size-standard) / 2 !default;
&.pt-icon-standard::before {
content: $pt-icon-caret-right;
}

.pt-icon {
margin: $tree-icon-spacing;
}
}

.pt-tree-node-icon {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-theme/src/components/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function renderBlock(block: IBlock | undefined, tagRenderers: ITagRendere
}
return block.contents.map((node, i) => {
if (typeof node === "string") {
return <div className="docs-section" dangerouslySetInnerHTML={{ __html: node }} key={i} />;
return <div className="docs-section pt-running-text" dangerouslySetInnerHTML={{ __html: node }} key={i} />;
}
try {
const renderer = tagRenderers[node.tag];
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-theme/src/components/modifierTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface IModifierTableProps {

export const ModifierTable: React.SFC<IModifierTableProps> = ({ children, title }) =>
React.Children.count(children) > 0 ? (
<div className="docs-modifiers pt-running-text-small">
<div className="docs-modifiers-table">
<table className="pt-html-table">
<thead>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-theme/src/components/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IPageProps {
export const Page: React.SFC<IPageProps> = ({ tagRenderers, page }) => {
const pageContents = renderBlock(page, tagRenderers);
return (
<div className="docs-page pt-running-text" data-page-id={page.reference}>
<div className="docs-page" data-page-id={page.reference}>
{pageContents}
</div>
);
Expand Down
9 changes: 3 additions & 6 deletions packages/docs-theme/src/styles/_api.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,17 @@
flex-direction: column;
margin: 0;
width: $content-width;

> * {
padding: $pt-grid-size ($pt-grid-size * 2);
}
}

.docs-interface-header {
flex: 0 0 auto;
margin: 0;
padding: $pt-grid-size ($pt-grid-size * 2);
}

.docs-interface-table {
.docs-modifiers-table {
overflow: auto;
padding-bottom: $pt-grid-size * 2;
padding: $pt-grid-size ($pt-grid-size * 2) ($pt-grid-size * 2);
}
}

Expand Down
17 changes: 5 additions & 12 deletions packages/docs-theme/src/styles/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,15 @@ $dark-example-background-color: $dark-content-background-color;
vertical-align: top;

> code {
display: inline-block;
margin-bottom: $pt-grid-size;
}

&[data-modifier="default"]:last-child > code {
display: none;
&:empty {
display: none;
}
}
}

// modifier labels
.docs-modifiers code,
.docs-example > code {
display: inline-block;
line-height: 1.4;
white-space: nowrap;

&:empty {
&[data-modifier="default"]:last-child > code {
display: none;
}
}
Expand Down

1 comment on commit 8396c0d

@blueprint-bot
Copy link

Choose a reason for hiding this comment

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

[docs] fix regressions (#2199)

Preview: documentation | landing | table

Please sign in to comment.