Skip to content

Commit 94427b7

Browse files
timothyiskodiakhq[bot]
authored andcommitted
Fix table font-sizes and dropdown arrow alignment (#1135)
* Fix table font-sizes and dropdown arrow alignment * Fix font-size for table bodies
1 parent 215dba0 commit 94427b7

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

components/api/table.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ export function Cell({ children, isHead, center }) {
154154
th {
155155
padding: 12px 20px 12px 0;
156156
color: #999;
157-
font-size: var(--font-size-primary);
158-
line-height: var(--line-height-primary);
157+
font-size: var(--font-size-small);
158+
line-height: var(--line-height-small);
159159
font-weight: normal;
160160
text-align: left;
161161
text-transform: uppercase;
@@ -177,8 +177,8 @@ export function Cell({ children, isHead, center }) {
177177
<style jsx>{`
178178
td {
179179
border-bottom: 1px solid var(--accents-2);
180-
font-size: var(--font-size-primary);
181-
line-height: var(--line-height-primary);
180+
font-size: var(--font-size-small);
181+
line-height: var(--line-height-small);
182182
padding: 12px 20px 12px 0;
183183
vertical-align: top;
184184
}

components/layout/header/header.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ class Header extends Component {
338338
>
339339
<MenuPopOver
340340
title="API"
341+
offsetArrowLeft={60}
341342
primaryList={[
342343
{ title: 'Platform API', url: '/docs/api' },
343344
{

components/layout/header/menu-popover.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export class MenuPopOver extends Component {
3131
secondaryTitle,
3232
primaryList,
3333
secondaryList,
34-
blogItem
34+
blogItem,
35+
offsetArrowLeft
3536
} = this.props
3637
const contentWidth = primaryList && secondaryList ? 480 : 160
3738
return (
@@ -53,7 +54,9 @@ export class MenuPopOver extends Component {
5354
offsetTop={0}
5455
to={
5556
<PopOver.Menu
56-
tipOffset={dashboard ? 58 : 60}
57+
tipOffset={
58+
offsetArrowLeft ? offsetArrowLeft : dashboard ? 58 : 60
59+
}
5760
noPadding
5861
width={dashboard ? 140 : contentWidth}
5962
>

components/table/table-body.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const TableBody = ({ children, ...props }) => (
1515
1616
tbody :global(td) {
1717
color: #444444;
18-
font-size: var(--font-size-primary);
19-
line-height: var(--line-height-primary);
18+
font-size: var(--font-size-small);
19+
line-height: var(--line-height-small);
2020
}
2121
`}</style>
2222
</tbody>

components/table/table.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ const Table = ({ children, className, ...other }) => {
6363
display: flex;
6464
align-items: center;
6565
padding: 10px 0;
66-
line-height: var(--line-height-primary);
67-
font-size: var(--font-size-primary);
66+
line-height: var(--line-height-small);
67+
font-size: var(--font-size-small);
6868
}
6969
7070
table :global(td > div) {
@@ -80,8 +80,8 @@ const Table = ({ children, className, ...other }) => {
8080
8181
table :global(th) {
8282
color: #666;
83-
font-size: var(--font-size-primary);
84-
line-height: var(--line-height-primary);
83+
font-size: var(--font-size-small);
84+
line-height: var(--line-height-small);
8585
font-weight: 400;
8686
letter-spacing: 0;
8787
}

0 commit comments

Comments
 (0)