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

fix(scrollbar): fix robot plugin scrollbar hide almost all scrollbar bug #340

Merged
merged 4 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/plugins/robot/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</template>
</tiny-dropdown>
</header>
<article class="chat-window" id="chatgpt-window">
<article class="chat-window lowcode-scrollbar-hide" id="chatgpt-window">
<tiny-layout>
<tiny-row
v-for="(item, index) in activeMessages"
Expand Down Expand Up @@ -390,8 +390,6 @@ export default {
.chat-window {
max-height: 400px;
overflow: scroll;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE 10+ */
.chat-avatar-wrap {
width: 46px;
.chat-avatar {
Expand Down Expand Up @@ -437,9 +435,6 @@ export default {
color: var(--ti-lowcode-chat-model-ai-fail-text);
}

::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.chat-tips {
text-align: right;
font-size: 12px;
Expand Down
9 changes: 7 additions & 2 deletions packages/settings/design/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,17 @@ body {
--base-top-panel-height: 35px;
--base-bottom-panel-height: 30px;
--base-nav-panel-width: 40px;
scrollbar-color: rgba(0, 0, 0, 0.1) #fff;
scrollbar-width: thin;
-webkit-font-smoothing: subpixel-antialiased;
background: #f9f9f9;
}

@supports not selector(::webkit-scrollbar) {
body {
scrollbar-color: rgba(0, 0, 0, 0.1) #fff;
scrollbar-width: thin;
}
}

ol,
ul {
list-style: none;
Expand Down
20 changes: 20 additions & 0 deletions packages/theme/common/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,23 @@ td {
-webkit-line-clamp: var(--ellipsis-line, 2);
-webkit-box-orient: vertical;
}

// support for not webkit browser and won't override ::webkit-scrollbar-* selector
@supports not selector(::-webkit-scrollbar) {
body {
* {
scrollbar-width: thin;
scrollbar-color: #dbdbdb transparent;
}
}

.lowcode-scrollbar-hide {
scrollbar-width: none;
}
}

.lowcode-scrollbar-hide {
&::-webkit-scrollbar {
display: none;
}
chilingling marked this conversation as resolved.
Show resolved Hide resolved
}
Loading