From 99b4ed2d76316fa311eada009378fa45e3762671 Mon Sep 17 00:00:00 2001 From: Gilad Gray Date: Sat, 3 Mar 2018 15:29:37 -0800 Subject: [PATCH] give ModifierTable its own class. fixes #2163 --- .../docs-theme/src/components/modifierTable.tsx | 2 +- packages/docs-theme/src/styles/_api.scss | 9 +++------ packages/docs-theme/src/styles/_content.scss | 17 +++++------------ 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/packages/docs-theme/src/components/modifierTable.tsx b/packages/docs-theme/src/components/modifierTable.tsx index e4da90b76d..f1efa4a5e1 100644 --- a/packages/docs-theme/src/components/modifierTable.tsx +++ b/packages/docs-theme/src/components/modifierTable.tsx @@ -12,7 +12,7 @@ export interface IModifierTableProps { export const ModifierTable: React.SFC = ({ children, title }) => React.Children.count(children) > 0 ? ( -
+
diff --git a/packages/docs-theme/src/styles/_api.scss b/packages/docs-theme/src/styles/_api.scss index c2c5241cf5..ee82ce354d 100644 --- a/packages/docs-theme/src/styles/_api.scss +++ b/packages/docs-theme/src/styles/_api.scss @@ -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); } } diff --git a/packages/docs-theme/src/styles/_content.scss b/packages/docs-theme/src/styles/_content.scss index 8c0398431e..c8a0930826 100644 --- a/packages/docs-theme/src/styles/_content.scss +++ b/packages/docs-theme/src/styles/_content.scss @@ -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; } }