Skip to content

Commit

Permalink
Display fragment links to the left
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Dec 4, 2019
1 parent 210c713 commit c49a771
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ const styles = theme => ({
paddingLeft: 30,
},
'& h1, & h2, & h3, & h4': {
position: 'relative',
'& code': {
fontSize: 'inherit',
lineHeight: 'inherit',
Expand All @@ -194,6 +195,10 @@ const styles = theme => ({
},
'& .anchor-link-style': {
display: 'inline-block',
position: 'absolute',
// negative box width of the anchor so that it is displayed before the heading
// -(iconWidth + anchorPadding)
left: 'calc(-0.7em - 16px)',
padding: '0 8px',
color: theme.palette.text.secondary,
'&:hover': {
Expand Down

0 comments on commit c49a771

Please sign in to comment.