Explorar o código

Improve drag block to database highlighting (#13284)

fix https://github.com/siyuan-note/siyuan/issues/13251
Jeffrey Chen hai 7 meses
pai
achega
18f68ac715

+ 16 - 4
app/src/assets/scss/business/_av.scss

@@ -125,14 +125,26 @@
     position: relative;
     position: relative;
     font-size: 87.5%;
     font-size: 87.5%;
 
 
-    &.dragover__bottom {
-      border-bottom-color: var(--b3-theme-primary-lighter);
+    &.dragover__top::before {
+      content: '';
+      position: absolute;
+      left: 0;
+      right: 0;
+      top: -2.5px;
+      height: 4px;
+      background-color: var(--b3-theme-primary-lighter);
       z-index: 3;
       z-index: 3;
     }
     }
 
 
-    &.dragover__top {
+    &.dragover__bottom::after {
+      content: '';
+      position: absolute;
+      left: 0;
+      right: 0;
+      bottom: -2.5px;
+      height: 4px;
+      background-color: var(--b3-theme-primary-lighter);
       z-index: 3;
       z-index: 3;
-      box-shadow: 0 -3px 0 var(--b3-theme-primary-lighter), inset 0 2px 0 var(--b3-theme-primary-lighter) !important;
     }
     }
 
 
     &:hover [data-type="block-more"] {
     &:hover [data-type="block-more"] {

+ 2 - 2
app/src/assets/scss/business/_drag.scss

@@ -13,12 +13,12 @@
   }
   }
 
 
   // 需要 !important,否则拖拽到闪卡无效果
   // 需要 !important,否则拖拽到闪卡无效果
-  &__top {
+  &__top:not(.av__row) {
     border-radius: 0 !important;
     border-radius: 0 !important;
     box-shadow: 0 -3px 0 var(--b3-theme-primary-lighter), inset 0 1px 0 var(--b3-theme-primary-lighter) !important;
     box-shadow: 0 -3px 0 var(--b3-theme-primary-lighter), inset 0 1px 0 var(--b3-theme-primary-lighter) !important;
   }
   }
 
 
-  &__bottom {
+  &__bottom:not(.av__row) {
     border-radius: 0 !important;
     border-radius: 0 !important;
     box-shadow: 0 2px 0 var(--b3-theme-primary-lighter), inset 0 -2px 0 var(--b3-theme-primary-lighter) !important;
     box-shadow: 0 2px 0 var(--b3-theme-primary-lighter), inset 0 -2px 0 var(--b3-theme-primary-lighter) !important;
   }
   }