瀏覽代碼

Improve drag block to database highlighting (#13284)

fix https://github.com/siyuan-note/siyuan/issues/13251
Jeffrey Chen 7 月之前
父節點
當前提交
18f68ac715
共有 2 個文件被更改,包括 18 次插入6 次删除
  1. 16 4
      app/src/assets/scss/business/_av.scss
  2. 2 2
      app/src/assets/scss/business/_drag.scss

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

@@ -125,14 +125,26 @@
     position: relative;
     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;
     }
 
-    &.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;
-      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"] {

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

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