diff --git a/packages/fighting-theme/src/alert.scss b/packages/fighting-theme/src/alert.scss index 163e75d0a8..d98f0f0260 100644 --- a/packages/fighting-theme/src/alert.scss +++ b/packages/fighting-theme/src/alert.scss @@ -55,10 +55,8 @@ } // 居中 - &.f-alert__center { - .f-alert__content { - justify-content: center; - } + &.f-alert__center .f-alert__content { + justify-content: center; } // 固定定位 diff --git a/packages/fighting-theme/src/button.scss b/packages/fighting-theme/src/button.scss index 66882772a2..0d048f43ab 100644 --- a/packages/fighting-theme/src/button.scss +++ b/packages/fighting-theme/src/button.scss @@ -26,10 +26,7 @@ content: ''; display: inline-block; position: absolute; - top: 0; - right: 0; - left: 0; - bottom: 0; + inset: 0; opacity: 0; border-radius: inherit; transition: 0.3s; @@ -96,10 +93,7 @@ // 涟漪容器 &__ripples-box { position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; + inset: 0; overflow: hidden; // 涟漪效果 diff --git a/packages/fighting-theme/src/confirm-box.scss b/packages/fighting-theme/src/confirm-box.scss index 3225d6c75c..39e2067f8c 100644 --- a/packages/fighting-theme/src/confirm-box.scss +++ b/packages/fighting-theme/src/confirm-box.scss @@ -4,18 +4,12 @@ justify-content: center; align-items: center; position: fixed; - top: 0; - right: 0; - left: 0; - bottom: 0; + inset: 0; // 遮罩层 &__mask { position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; + inset: 0; background-color: rgba(0, 0, 0, 0.5); display: flex; transition: opacity 0.3s ease; diff --git a/packages/fighting-theme/src/drawer.scss b/packages/fighting-theme/src/drawer.scss index 19fd62b091..2d6706588e 100644 --- a/packages/fighting-theme/src/drawer.scss +++ b/packages/fighting-theme/src/drawer.scss @@ -1,9 +1,6 @@ .f-drawer { position: fixed; - top: 0; - right: 0; - left: 0; - bottom: 0; + inset: 0; z-index: var(--drawer-z-index, 2000); // 不同方向 @@ -58,10 +55,7 @@ // 遮罩层 &__mask { position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; + inset: 0; opacity: var(--drawer-mask-opacity, 0.4); background-color: var(--drawer-mask-background, #000); } @@ -74,10 +68,7 @@ // 主容器公共样式 &__wrapper { position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; + inset: 0; z-index: 1999; transition: 0.3s; @@ -157,18 +148,4 @@ &__trans-leave-to { opacity: 0; } - - // // 全屏展示 - // &.f-drawer__fullscreen { - // .f-drawer__wrapper { - // overflow: hidden; - - // .f-drawer__container { - // height: 100vh; - // width: 100vw; - // border-radius: 0; - // overflow: auto; - // } - // } - // } } diff --git a/packages/fighting-theme/src/dropdown.scss b/packages/fighting-theme/src/dropdown.scss index 6ef04228d5..1d0ad1cc08 100644 --- a/packages/fighting-theme/src/dropdown.scss +++ b/packages/fighting-theme/src/dropdown.scss @@ -1,5 +1,4 @@ .f-dropdown { - // display: inline-block; vertical-align: middle; position: relative; diff --git a/packages/fighting-theme/src/image-preview.scss b/packages/fighting-theme/src/image-preview.scss index 3caf010b9e..d0e02f78f3 100644 --- a/packages/fighting-theme/src/image-preview.scss +++ b/packages/fighting-theme/src/image-preview.scss @@ -1,18 +1,12 @@ .f-image-preview { position: fixed; - top: 0; - right: 0; - left: 0; - bottom: 0; + inset: 0; z-index: 2000; // 遮罩层 &__mask { position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; + inset: 0; opacity: 0.5; background-color: #23272e; } @@ -20,10 +14,7 @@ // 主容器 &__container { position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; + inset: 0; z-index: 1999; transition: 0.3s; display: flex;