diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-13 22:10:25 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-13 22:10:25 +0800 |
commit | e0e011eb668a13c25cb5dc64256f89d07e9cbe15 (patch) | |
tree | 49c2127138e333dda421b88f5372fedeec9f9912 /packages/website/ts | |
parent | a5eb346dd18f81b171280291f3d01b900a4aff1d (diff) | |
download | dexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.tar.gz dexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.tar.zst dexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.zip |
Fix sidebar shifting onHover due to scrollbar width
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/pages/documentation/developers_page.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index c924fb460..12c00b440 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -70,6 +70,7 @@ export class DevelopersPage extends React.Component<DevelopersPageProps, Develop }; const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; const mainContentPadding = isSmallScreen ? 20 : 50; + const sidebarPadding = 22; return ( <Container className="flex items-center overflow-hidden" @@ -105,9 +106,17 @@ export class DevelopersPage extends React.Component<DevelopersPageProps, Develop onMouseLeave={this._onSidebarHover.bind(this, false)} onWheel={this._throttledSidebarScrolling} > - <Container paddingLeft="22px" paddingRight="22px" paddingBottom="100px"> + <div + style={{ + paddingBottom: 100, + paddingLeft: sidebarPadding, + paddingRight: this.state.isHoveringSidebar + ? sidebarPadding - SCROLLER_WIDTH + : sidebarPadding, + }} + > {this.props.sidebar} - </Container> + </div> </div> </Container> <Container |