Skip to content

Commit

Permalink
Implement it to PublicKeysList
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyandreevsky committed Dec 11, 2024
1 parent 37bbac8 commit 4bff883
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
@import '../../styles/variables.scss';

.PublicKeysList {
container-type: inline-size;
@include mixins.BrandScroll();
overflow-x: scroll;
container-type: inline-size;

&__ScrollZone {
width: fit-content;
Expand Down
29 changes: 2 additions & 27 deletions packages/frontend/src/components/total/TotalInfo.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@use '../../styles/mixins.scss';
@import '../../styles/variables.scss';

$scrollColor: $color-brand-shaded;
$scrollBackgroundColor: rgba(0, 0, 0, .3);

.TotalInfo {
scroll-behavior: smooth;
scrollbar-width: thin;
scrollbar-color: $scrollColor $scrollBackgroundColor;
@include mixins.BrandScroll();

&__ContentContainer {
margin: 0 auto;
Expand All @@ -23,28 +18,8 @@ $scrollBackgroundColor: rgba(0, 0, 0, .3);
}
}

&::-webkit-scrollbar {
height: 8px;
border-radius: 10px;
}

&::-webkit-scrollbar-thumb {
background-color: $scrollColor;
border-radius: 10px;
}

&::-webkit-scrollbar-track {
background-color: $scrollBackgroundColor;
border-radius: 10px;
}

@supports (scrollbar-width: thin) {
scrollbar-width: thin;
scrollbar-color: $scrollColor $scrollBackgroundColor;
}

@media screen and (max-width: $breakpoint-lg) {
overflow-y: scroll;
overflow-y: auto;
padding-bottom: 4px;

&__ContentContainer {
Expand Down
26 changes: 25 additions & 1 deletion packages/frontend/src/styles/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -424,4 +424,28 @@
margin-bottom: 0;
}
}
}
}

@mixin BrandScroll () {
scroll-behavior: smooth;
scrollbar-width: thin;
scrollbar-color: $scrollColor $scrollBackgroundColor;

&::-webkit-scrollbar {
height: 2px;
width: 2px;
}

&::-webkit-scrollbar-thumb {
background-color: $scrollColor;
}

&::-webkit-scrollbar-track {
background-color: $scrollBackgroundColor;
}

@supports (scrollbar-width: thin) {
scrollbar-width: thin;
scrollbar-color: $scrollColor $scrollBackgroundColor;
}
}
4 changes: 3 additions & 1 deletion packages/frontend/src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ $color-brand-pressed: var(--chakra-colors-brand-pressed);

$transition-time-def: .15s;

$blockBackgroundBlur: blur(44px)

$scrollColor: $color-brand-normal;
$scrollBackgroundColor: rgba(255, 255, 255, .05);

0 comments on commit 4bff883

Please sign in to comment.