From cee33cb6dd7e05346c5de2ba9a331164af3fc26a Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 4 May 2020 12:52:38 +0800 Subject: [PATCH] fix(ShareSheet): incorrect scrollbar height in some browsers (#6207) --- src/share-sheet/index.less | 16 +++++++++------- src/style/var.less | 1 - 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/share-sheet/index.less b/src/share-sheet/index.less index 9adbadd1e..f2002f2cc 100644 --- a/src/share-sheet/index.less +++ b/src/share-sheet/index.less @@ -26,8 +26,9 @@ &__options { position: relative; display: flex; - padding: @padding-md 0 @padding-md @padding-lg; + padding: @padding-md 0 @padding-md @padding-xs; overflow-x: auto; + overflow-y: visible; -webkit-overflow-scrolling: touch; &--border::before { @@ -39,23 +40,22 @@ &::after { display: block; flex-shrink: 0; - width: @padding-lg; + width: @padding-xs; content: ''; } + + &::-webkit-scrollbar { + height: 0; + } } &__option { display: flex; flex-direction: column; align-items: center; - margin-right: @share-sheet-option-margin-right; cursor: pointer; user-select: none; - &:last-child { - margin-right: 0; - } - &:active { opacity: @active-opacity; } @@ -64,10 +64,12 @@ &__icon { width: @share-sheet-icon-size; height: @share-sheet-icon-size; + margin: 0 @padding-md; } &__name { margin-top: @padding-xs; + padding: 0 @padding-base; color: @share-sheet-option-name-color; font-size: @share-sheet-option-name-font-size; } diff --git a/src/style/var.less b/src/style/var.less index 061adfddb..93026b09e 100644 --- a/src/style/var.less +++ b/src/style/var.less @@ -592,7 +592,6 @@ @share-sheet-description-font-size: @font-size-sm; @share-sheet-description-line-height: 16px; @share-sheet-icon-size: 48px; -@share-sheet-option-margin-right: @padding-xl; @share-sheet-option-name-color: @gray-7; @share-sheet-option-name-font-size: @font-size-sm; @share-sheet-cancel-button-font-size: @font-size-lg;