diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss index 1ed970a55..c7d164fd7 100644 --- a/app/src/assets/scss/business/_av.scss +++ b/app/src/assets/scss/business/_av.scss @@ -383,40 +383,40 @@ min-height: 23px; padding: 5px 4px; + &--wrap { + word-break: break-all; + white-space: pre-wrap; + } + .av__cell { padding: 2px 4px; border-right: 0; + min-height: calc(1.625em + 4px); - .block__icon { - display: none; + &:not([data-dtype="block"])[data-empty="true"] { + padding: 0 4px; + min-height: auto; } &:hover { background-color: var(--b3-list-hover); border-radius: var(--b3-border-radius); - .b3-chip[data-type=block-more] { - top: 2px; + .b3-chip[data-type="block-more"] { + top: 4px; display: block; } } + .block__icon { + display: none; + } + &[data-dtype="created"], &[data-dtype="updated"], &[data-dtype="lineNumber"] { cursor: default; } - } - - &--wrap { - word-break: break-all; - white-space: pre-wrap; - } - - &:not(.av__gallery-fields--edit) .av__cell { - &[data-empty="true"] { - padding: 0 4px; - } &[data-dtype="mAsset"], &[data-dtype="mSelect"], @@ -425,22 +425,19 @@ } } - &--edit { - .av__cell { - min-height: 1.625em; + &--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; } - .av__cell[data-empty="true"] .av__gallery-tip { + &[data-empty="true"] .av__gallery-tip { display: flex; } - - .av__cell { - &[data-dtype="mAsset"][data-empty="false"], - &[data-dtype="mSelect"][data-empty="false"], - &[data-dtype="select"][data-empty="false"] { - margin-left: -2px; - } - } } } diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index d32921a87..0991f9aae 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -496,9 +496,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type height = contentRect.bottom - cellRect.top; } const width = Math.min(Math.max(cellRect.width, 25), contentRect.width); - style = `style="padding-top: ${viewType === "table" ? 6.5 : 1}px;position:absolute;left: ${(cellRect.left < contentRect.left || cellRect.left + width > contentRect.right) ? contentRect.left : cellRect.left}px;top: ${cellRect.top}px;width:${width}px;height: ${height}px"`; + style = `style="padding: ${viewType === "table" ? 6 : 3}px 8px;position:absolute;left: ${(cellRect.left < contentRect.left || cellRect.left + width > contentRect.right) ? contentRect.left : cellRect.left}px;top: ${cellRect.top}px;width:${width}px;height: ${height}px"`; } else { - style = `style="padding-top: ${viewType === "table" ? 6.5 : 1}px;position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 25)}px;height: ${height}px"`; + style = `style="padding: ${viewType === "table" ? 6 : 3}px 8px;position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 25)}px;height: ${height}px"`; } if (["text", "email", "phone", "block", "template"].includes(type)) {