Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions app/src/assets/scss/business/_av.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
overflow-x: auto;
overflow-y: hidden;
cursor: auto;
}

&[data-av-type="gallery"] > .av__container {
overflow: inherit;
padding: 2px;
}

&__pulse {
Expand Down Expand Up @@ -104,6 +101,7 @@
&:empty::after {
color: var(--b3-theme-on-surface-light);
content: attr(data-tip);
pointer-events: none;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

伪元素影响了光标样式

image

}
}

Expand Down Expand Up @@ -345,6 +343,7 @@
object-fit: cover;
width: 100%;
object-position: center;
pointer-events: none;

&--fit {
object-fit: contain;
Expand Down Expand Up @@ -380,16 +379,15 @@
transition: background 100ms ease-out;
white-space: nowrap;
font-size: 85%;
min-height: 23px;
padding: 5px 4px;
padding: 10px 5px;
Copy link
Contributor Author

@TCOTC TCOTC Jun 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前的边距太窄了,有点难看,参考 Notion 把整体边距改到 10px


&--wrap {
word-break: break-all;
white-space: pre-wrap;
}

.av__cell {
padding: 2px 4px;
padding: 2px 5px;
border-right: 0;
min-height: calc(1.625em + 4px);

Expand All @@ -403,8 +401,9 @@
border-radius: var(--b3-border-radius);

.b3-chip[data-type="block-more"] {
top: 4px;
display: block;
top: 5px;
margin: 0;
z-index: 1;
}
}
Expand All @@ -419,23 +418,19 @@
cursor: default;
}

&[data-dtype="mAsset"],
&[data-dtype="mSelect"],
&[data-dtype="select"] {
margin-left: -2px;
.b3-chip {
margin: 3px 6px 3px 0;
}

.av__cellassetimg {
margin: 3px 6px 3px 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解决 单选、多选、资源字段 的边距问题

}
}

&--edit .av__cell {
padding: 2px 4px !important;
min-height: calc(1.625em + 4px) !important;

&[data-dtype="mAsset"][data-empty="true"],
&[data-dtype="mSelect"][data-empty="true"],
&[data-dtype="select"][data-empty="true"] {
margin-left: 0;
}

&[data-empty="true"] .av__gallery-tip {
display: flex;
}
Expand Down Expand Up @@ -699,7 +694,7 @@
}

.b3-chip {
margin: 1px 2px;
margin: 1px 4px 1px 0;
padding: 2px 6px;
line-height: calc(1.625em - 6px);
font-size: inherit;
Expand Down Expand Up @@ -917,7 +912,7 @@
img.av__cellassetimg {
max-height: calc(1.625em - 2px);
border-radius: var(--b3-border-radius);
margin: 1px 2px;
margin: 1px 4px 1px 0;
max-width: none;
vertical-align: top;
font-size: inherit;
Expand Down
2 changes: 1 addition & 1 deletion app/src/assets/scss/business/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
}

.b3-chip {
margin: 1px 2px;
margin: 1px 4px 1px 0;
}

.av__cellassetimg {
Expand Down
2 changes: 1 addition & 1 deletion app/src/assets/scss/protyle/_protyle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
&:empty::after {
content: attr(data-tip);
color: var(--b3-theme-on-surface-light);
cursor: text;
pointer-events: none;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟前面伪元素影响光标样式的问题使用一致的解决方法

}

&:focus {
Expand Down
4 changes: 4 additions & 0 deletions app/src/assets/scss/protyle/_wysiwyg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@
}
}
}

div[data-type="NodeAttributeView"] {
padding: 2px;
}
}

// 只读情况下列表前的圆点需要可以点击进行缩放
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/gallery/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex,
</div>
<div class="fn__space"></div>
<span data-type="av-more" aria-label="${window.siyuan.languages.config}" data-position="8south" class="ariaLabel block__icon">
<svg><use xlink:href="#iconMore"></use></svg>
<svg><use xlink:href="#iconSettings"></use></svg>
</span>
<div class="fn__space"></div>
<span data-type="av-add-more" class="block__icon ariaLabel" data-position="8south" aria-label="${window.siyuan.languages.newRow}">
Expand Down