From be7b9665bb66fed925102d34d49039ffb0e4fd78 Mon Sep 17 00:00:00 2001 From: kooriookami <38392315+kooriookami@users.noreply.github.com> Date: Sun, 13 Dec 2020 04:21:58 -0600 Subject: [PATCH] fix(scrollbar): native scrollbar not hide when `native` is not true (#971) negative value of margin-bottom not work in certain scenarios. --- packages/scrollbar/src/index.vue | 2 +- packages/theme-chalk/src/scrollbar.scss | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/scrollbar/src/index.vue b/packages/scrollbar/src/index.vue index 67d5f9bc6d..1508d04536 100644 --- a/packages/scrollbar/src/index.vue +++ b/packages/scrollbar/src/index.vue @@ -5,7 +5,7 @@ :class="[ wrapClass, 'el-scrollbar__wrap', - native ? '' : gutter ? '' : 'el-scrollbar__wrap--hidden-default', + native ? '' : 'el-scrollbar__wrap--hidden-default', ]" :style="style" @scroll="handleScroll" diff --git a/packages/theme-chalk/src/scrollbar.scss b/packages/theme-chalk/src/scrollbar.scss index 56e5f29106..f38026c5c4 100644 --- a/packages/theme-chalk/src/scrollbar.scss +++ b/packages/theme-chalk/src/scrollbar.scss @@ -4,6 +4,7 @@ @include b(scrollbar) { overflow: hidden; position: relative; + height: 100%; &:hover, &:active, @@ -21,8 +22,7 @@ @include m(hidden-default) { scrollbar-width: none; &::-webkit-scrollbar { - width: 0; - height: 0; + opacity: 0; } } }