aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-13 22:10:25 +0800
committerFabio Berger <me@fabioberger.com>2018-10-13 22:10:25 +0800
commite0e011eb668a13c25cb5dc64256f89d07e9cbe15 (patch)
tree49c2127138e333dda421b88f5372fedeec9f9912 /packages/website/ts/pages
parenta5eb346dd18f81b171280291f3d01b900a4aff1d (diff)
downloaddexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.tar
dexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.tar.gz
dexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.tar.bz2
dexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.tar.lz
dexon-sol-tools-e0e011eb668a13c25cb5dc64256f89d07e9cbe15.tar.xz
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/pages')
-rw-r--r--packages/website/ts/pages/documentation/developers_page.tsx13
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