Skip to content

Commit

Permalink
[docs] Better visually group tocs items
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed May 10, 2020
1 parent f5de90f commit 79ef426
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions docs/src/modules/components/AppTableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const useStyles = makeStyles((theme) => ({
},
contents: {
marginTop: theme.spacing(2),
paddingLeft: theme.spacing(1),
paddingLeft: 8,
},
ul: {
padding: 0,
Expand All @@ -36,20 +36,17 @@ const useStyles = makeStyles((theme) => ({
},
item: {
fontSize: '.8125rem',
lineHeight: 2,
// paddingLeft: theme.spacing(1) where `border` is used as the "active" marker
paddingLeft: Math.max(0, theme.spacing(1) - 4),
borderLeft: `4px solid transparent`,
margin: theme.spacing(1, 0),
paddingLeft: 5,
borderLeft: `3px solid transparent`,
boxSizing: 'border-box',
'&:hover': {
borderLeft: `4px solid ${
theme.palette.type === 'light' ? theme.palette.grey[200] : theme.palette.grey[900]
}`,
borderLeftColor:
theme.palette.type === 'light' ? theme.palette.grey[200] : theme.palette.grey[900],
},
'&$active,&:active': {
borderLeft: `4px solid ${
theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[800]
}`,
borderLeftColor:
theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[800],
},
},
secondaryItem: {
Expand Down

0 comments on commit 79ef426

Please sign in to comment.