fix(project): fit goal rows to text height
This commit is contained in:
@@ -2214,6 +2214,7 @@ input.pj-goal-num:focus { outline: 2px solid var(--pj-accent); outline-offset: -
|
||||
|
||||
/* 업무 영역 — 영역 색(--goal-bg)이 줄 전체 배경(스프레드시트처럼) */
|
||||
.pj-goal-area > tr > th, .pj-goal-area > tr > td { background: var(--goal-bg, #fff); border-color: rgba(0, 0, 0, .07); }
|
||||
.pj-goal-area > tr > th { padding: 6px 8px; vertical-align: top; }
|
||||
.pj-goal-area > tr:first-child > * { border-top: 1px solid rgba(0, 0, 0, .12); }
|
||||
.pj-goal-area-name { font-size: var(--pj-text-size); font-weight: 500 !important; }
|
||||
.pj-goal-area-text, .pj-goal-row-text { display: block; word-break: keep-all; overflow-wrap: anywhere; }
|
||||
@@ -2236,7 +2237,7 @@ th.pj-goal-area-name:focus-within .pj-goal-menu-btn, th.pj-goal-row-label:focus-
|
||||
html.pj-goal-selecting .pj-goal-menu-btn { pointer-events: none; }
|
||||
@media print { .pj-goal-menu-btn { display: none !important; } }
|
||||
.pj-goal-text {
|
||||
display: block; width: 100%; box-sizing: border-box; min-height: 46px; padding: 6px; border: none;
|
||||
display: block; width: 100%; box-sizing: border-box; min-height: calc(var(--pj-text-leading) + 12px); padding: 6px; border: none;
|
||||
white-space: pre-wrap; overflow-wrap: anywhere;
|
||||
background: transparent; font: inherit; line-height: var(--pj-text-leading); color: inherit; resize: none; overflow: hidden;
|
||||
}
|
||||
@@ -2246,8 +2247,11 @@ html.pj-goal-selecting .pj-goal-menu-btn { pointer-events: none; }
|
||||
box-shadow: inset 0 0 0 2px var(--pj-accent);
|
||||
background-image: linear-gradient(rgba(255, 255, 255, .75), rgba(255, 255, 255, .75));
|
||||
}
|
||||
.pj-goal-text:empty::before { content: attr(data-placeholder); pointer-events: none; color: rgba(0, 0, 0, .3); }
|
||||
.pj-goal-text-ro { min-height: 46px; padding: 6px; line-height: var(--pj-text-leading); white-space: pre-wrap; overflow-wrap: anywhere; }
|
||||
.pj-goal-text:empty::before {
|
||||
content: attr(data-placeholder); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
pointer-events: none; color: rgba(0, 0, 0, .3);
|
||||
}
|
||||
.pj-goal-text-ro { box-sizing: border-box; min-height: calc(var(--pj-text-leading) + 12px); padding: 6px; line-height: var(--pj-text-leading); white-space: pre-wrap; overflow-wrap: anywhere; }
|
||||
.pj-goal-text span, .pj-goal-text-ro span { line-height: normal; }
|
||||
.pj-goal-area td.is-now { box-shadow: inset 2px 0 0 rgba(123, 104, 238, .35), inset -2px 0 0 rgba(123, 104, 238, .35); }
|
||||
.pj-goal-texttd.pj-goal-year-col { font-weight: 600; }
|
||||
|
||||
@@ -8904,8 +8904,11 @@
|
||||
applyFold(h, true);
|
||||
});
|
||||
});
|
||||
// 글 칸 높이 맞추기 — 접혀 안 보이는 칸은 건너뛴다(높이 0 으로 재져 펼쳤을 때 글이 잘림). 펼칠 때 다시 잰다.
|
||||
// contenteditable 글 칸은 내용의 자연 높이를 쓴다. 표가 가장 높은 칸에 행을 맞추고
|
||||
// 짧은 칸은 상단에 둔다. 글·폭·부분 서식 변경과 숨긴 분기에서도 오래된 높이가 남지 않는다.
|
||||
function fit(ta) {
|
||||
if (ta.tagName !== "TEXTAREA") { ta.style.removeProperty("height"); return; }
|
||||
// 예전 textarea 템플릿도 지원하되 접힌 칸은 펼친 뒤 잰다.
|
||||
if (!ta.offsetParent) return;
|
||||
ta.style.height = "auto";
|
||||
ta.style.height = ta.scrollHeight + "px";
|
||||
|
||||
Reference in New Issue
Block a user