From 443e7320ccd6d55d689cd474cffb169335de2316 Mon Sep 17 00:00:00 2001 From: cipchk Date: Tue, 17 Sep 2024 16:23:53 +0800 Subject: [PATCH] feat(theme): add `.hide-scrollbar` style --- 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 4e24e4738..f8996aeaa 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; + } +}