Skip to content

Commit

Permalink
Merge pull request LN-Zap#1044 from mrfelton/fix/scrollbars
Browse files Browse the repository at this point in the history
fix(ui): autohide scrollbars
  • Loading branch information
JimmyMow authored Dec 7, 2018
2 parents f4e3a8b + fd427cf commit 27f9b5e
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const BackgroundPrimaryWithTheme = withTheme(({ theme, ...rest }) => (
<BackgroundPrimary
className={theme.name}
p={3}
css={{ height: '100vh', 'overflow-y': 'scroll !important' }}
css={{ height: '100vh', 'overflow-y': 'auto !important' }}
{...rest}
/>
))
Expand Down
2 changes: 1 addition & 1 deletion app/components/Settings/Fiat/Fiat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

.fiatTickers {
height: 300px;
overflow-y: scroll;
overflow-y: auto;

li {
background: var(--secondaryColor);
Expand Down
2 changes: 1 addition & 1 deletion app/components/Settings/Locale/Locale.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

.locales {
height: 300px;
overflow-y: scroll;
overflow-y: auto;

li {
background: var(--secondaryColor);
Expand Down
15 changes: 15 additions & 0 deletions app/components/UI/GlobalStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ const GlobalStyle = createGlobalStyle`
font-size: 13px;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.3);
border-radius: 5px;
}
a {
text-decoration: none;
color: inherit;
Expand Down
2 changes: 1 addition & 1 deletion app/components/UI/MainContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const MainContent = ({ css, ...rest }) => (
css={Object.assign(
{
position: 'relative',
'overflow-y': 'scroll'
'overflow-y': 'auto'
},
css
)}
Expand Down
2 changes: 1 addition & 1 deletion app/components/UI/Panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PanelBody = ({ children, css, ...rest }) => (
css={Object.assign(
{
flex: 1,
overflow: 'scroll'
'overflow-y': 'auto'
},
css
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`component.UI.MainContent should render correctly 1`] = `
color: primaryText;
background-color: primaryColor;
position: relative;
overflow-y: scroll;
overflow-y: auto;
}
<article
Expand Down
2 changes: 1 addition & 1 deletion test/unit/components/UI/__snapshots__/Modal.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`component.UI.Modal should render correctly 1`] = `
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
overflow: scroll;
overflow-y: auto;
}
.c0 {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/components/UI/__snapshots__/Panel.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`component.UI.Panel should render correctly 1`] = `
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
overflow: scroll;
overflow-y: auto;
}
.c2 {
Expand Down

0 comments on commit 27f9b5e

Please sign in to comment.