Skip to content

Commit

Permalink
Add scrollWrapperThin class and apply it
Browse files Browse the repository at this point in the history
  • Loading branch information
napieralla committed Aug 1, 2020
1 parent 947ecf6 commit 0df8e0e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
15 changes: 12 additions & 3 deletions src/app/assets/styles/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ img {
overflow: auto;

&::-webkit-scrollbar {
width: 4px;
height: 4px;
width: 7px;
height: 7px;
border-radius: 2px;
}

Expand Down Expand Up @@ -106,7 +106,16 @@ img {
scrollbar-color: lighten($accent_color, 18%) $background_color;
}

&-thick {
&Thin {
@extend .scrollWrapper;
&::-webkit-scrollbar {
width: 4px;
height: 4px;
}
scrollbar-width: thin; // Firefox specific
}

&Thick {
@extend .scrollWrapper;
&::-webkit-scrollbar {
width: 9px;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Common/Modal/Modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
animation: fadein 0.1s ease-out;

.modal {
@extend .scrollWrapper-thick;
@extend .scrollWrapper;

width: 70%;
max-width: 900px;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Common/PageContent/PageContent.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../../assets/styles/common.scss';

.pageContent {
@extend .scrollWrapper-thick;
@extend .scrollWrapperThick;

padding: 0 1.5em 15px;
flex: 1;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Common/Tracks/TracksGrid/TracksGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const TracksGrid: React.FC<TracksGridProps> = ({
playTrack,
}) => {
return (
<div className={commonClasses.scrollWrapper}>
<div className={commonClasses.scrollWrapperThin}>
<div className={classes.trackGrid}>
{tracks.map((track, index) => (
<TrackListItem
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Routes/Catalog/Browse/ItemList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ItemList: React.FC<ItemListProps> = ({
return (
<>
<h3>{title}</h3>
<div className={commonClasses.scrollWrapper}>
<div className={commonClasses.scrollWrapperThin}>
<div className={cx(classes.scrollGrid)} style={styles}>
{finalItems.map((item: MediaItem) => {
switch (type) {
Expand Down
8 changes: 4 additions & 4 deletions src/app/components/Routes/Catalog/ForYou/ForYouPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ForYouPage extends React.Component<ForYouPageProps, ForYouPageState> {
return (
<>
<h3>{translate.recentlyPlayed}</h3>
<div className={cx(commonClasses.scrollWrapper)}>
<div className={cx(commonClasses.scrollWrapperThin)}>
<div className={classes.scrollGrid}>
{recentlyPlayed.map((item: RecentlyPlayedItem) => {
switch (item.type) {
Expand Down Expand Up @@ -115,7 +115,7 @@ class ForYouPage extends React.Component<ForYouPageProps, ForYouPageState> {
return (
<>
<h3>{translate.heavyRotation}</h3>
<div className={commonClasses.scrollWrapper}>
<div className={commonClasses.scrollWrapperThin}>
<div className={classes.scrollGrid}>
{heavyRotation.map((item: HeavyRotationItem) => {
switch (item.type) {
Expand Down Expand Up @@ -166,8 +166,8 @@ class ForYouPage extends React.Component<ForYouPageProps, ForYouPageState> {
return (
<React.Fragment key={id}>
<h3>{group.attributes.title.stringForDisplay}</h3>
<div className={cx(commonClasses.scrollWrapper)}>
<div className={cx(commonClasses.scrollWrapper)}>
<div className={cx(commonClasses.scrollWrapperThin)}>
<div className={cx(commonClasses.scrollWrapperThin)}>
<div className={classes.scrollGrid}>
{items.data.map((item: RecommendationGroupItem) => {
switch (item.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Routes/Library/Artists/ArtistsPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

.artistList {
@extend .scrollWrapper;
@extend .scrollWrapperThin;

width: 250px;
height: 100%;
Expand Down

0 comments on commit 0df8e0e

Please sign in to comment.