From c4e07f2102af3c6b30cf6549d13517772ffec4dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Tue, 17 Sep 2024 16:25:39 +0800 Subject: [PATCH] feat(theme): add `.hide-scrollbar` style (#1835) --- packages/theme/system/utils/_scrollbar.less | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/theme/system/utils/_scrollbar.less b/packages/theme/system/utils/_scrollbar.less index 4e24e47383..f8996aeaa4 100644 --- a/packages/theme/system/utils/_scrollbar.less +++ b/packages/theme/system/utils/_scrollbar.less @@ -51,3 +51,25 @@ .scrollbar-mixin(~'.@{ant-prefix}-table-header, .@{ant-prefix}-table-body'); } .scrollbar-table-mixin(@scrollbar-table-enabled); + +/** + * Hide scrollbar + * + * 隐藏滚动条 + */ +.hide-scrollbar { + scrollbar-width: none; + scrollbar-color: transparent transparent; + + &::-webkit-scrollbar { + width: 1px; + } + + &::-webkit-scrollbar-track { + background: transparent; + } + + &::-webkit-scrollbar-thumb { + background-color: transparent; + } +}