Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(scrollbar): added new scrollbar to emote #2899

Merged
merged 11 commits into from
May 4, 2022
3 changes: 1 addition & 2 deletions assets/styles/framework/colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
@black: #000;

@primary-color: #2761fd;
@primary-color-alt: #2761fd;
@scrollbar-color: @primary-color;
@scrollbar-color: var(--flair-color);

@secondary-text: #dae0ff;
@text: #ffffff;
Expand Down
2 changes: 1 addition & 1 deletion assets/styles/thirdparty/multiselect.less
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fieldset[disabled] .multiselect {
}
.multiselect__tag-icon:focus,
.multiselect__tag-icon:hover {
background: @primary-color-alt;
background: @primary-color;
}
.multiselect__tag-icon:focus:after,
.multiselect__tag-icon:hover:after {
Expand Down
2 changes: 1 addition & 1 deletion components/ui/BadgedIcon/BadgedIcon.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
.tag {
&:not(body).is-dark {
.tag-number {
background: @primary-color-alt;
background: @primary-color;
}
background: @background;
}
Expand Down
2 changes: 1 addition & 1 deletion components/ui/Chat/Embeds/VideoPlayer/VideoPlayer.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ video {
&:extend(.glow-primary);
&:hover {
&:extend(.glow-primary);
background: @primary-color-alt !important;
background: @primary-color !important;
}
background: @primary-color !important;
}
Expand Down
6 changes: 5 additions & 1 deletion components/ui/SimpleScroll/SimpleScroll.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div
id="simple-scrollbar"
v-scroll-lock="true"
:class="{'scrollbar-always-visible': scrollShow === 'always' , 'scrollbar-vertical': scrollMode === 'vertical', 'scrollbar-horizontal': scrollMode === 'horizontal'}"
v-if="Object.keys(this.$slots).length !== 0"
>
<slot />
<div class="wrapper">
<slot />
</div>
</div>
34 changes: 27 additions & 7 deletions components/ui/SimpleScroll/SimpleScroll.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
width: @full;
height: @full;

.wrapper {
width: @full;
height: @full;
box-sizing: border-box;
}

&.scrollbar-vertical {
overflow-x: hidden;
overflow-y: scroll;
padding-right: @scroll-bar-size*2;

.wrapper {
padding-right: @scroll-bar-size;
}

&::-webkit-scrollbar {
width: @scroll-bar-size;
Expand All @@ -15,25 +24,36 @@
&.scrollbar-horizontal {
overflow-y: hidden;
overflow-x: scroll;
padding-bottom: @scroll-bar-size*2;

.wrapper {
padding-bottom: @scroll-bar-size;
}

&::-webkit-scrollbar {
height: @scroll-bar-size;
}
}

scrollbar-width: thin;
scrollbar-color: var(--flair-color) transparent;
scrollbar-color: @scrollbar-color transparent;

&:hover {
&::-webkit-scrollbar-thumb {
border-radius: @scroll-bar-size*2;
background-color: var(--flair-color);
background-color: @scrollbar-color;
}
}

&.scrollbar-always-visible::-webkit-scrollbar-thumb {
border-radius: @scroll-bar-size*2;
background-color: var(--flair-color);
background-color: @scrollbar-color;
}

&::-webkit-scrollbar-thumb {
&:extend(.round-corners);
}

@media only screen and (max-width: 1024px) {
&::-webkit-scrollbar-thumb {
background-color: @scrollbar-color;
}
}
}
8 changes: 4 additions & 4 deletions components/views/chat/enhancers/Enhancers.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
</InteractablesButtonGroup>
</div>
<div id="container">
<UiScroll
verticalScroll
scrollbarVisibility="scroll"
<UiSimpleScroll
scrollMode="vertical"
scrollShow="scroll"
v-if="ui.enhancers.route === 'emotes'"
>
<emoji-picker @emoji="addEmoji" :search="search.toLowerCase()">
Expand Down Expand Up @@ -81,7 +81,7 @@
</div>
</div>
</emoji-picker>
</UiScroll>
</UiSimpleScroll>
<EnhancersGlyphs v-if="ui.enhancers.route === 'glyphs'" />
</div>
</div>
2 changes: 1 addition & 1 deletion components/views/chat/enhancers/Enhancers.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
position: relative;
flex: 1;
&:extend(.full-width);
height: calc(@full - 3rem);
height: calc(@full - 52px);
overflow-y: scroll;
&::-webkit-scrollbar {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion components/views/marketplace/card/Card.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
&:extend(.full-width);
position: relative;
height: 170px;
background: @primary-color-alt;
background: @primary-color;
background-position: center;
background-size: cover;
}
Expand Down
2 changes: 1 addition & 1 deletion components/views/marketplace/glyphs/shop/item/Item.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
height: 10.5rem;
padding: @normal-spacing;
border-radius: 4px 4px 0px 0px;
background: @primary-color-alt;
background: @primary-color;
background-position: center;
background-size: cover;
.btn-group {
Expand Down