fix(공용 표 높이): 창 끝까지 셈(spaceBelow)이 열린 창 가림막 · 알림(fixed · absolute)을 표 아래 자리로 재던 흠 (PLAN 707-5 딸림)

- body 끝 가림막(창 높이)이 뒤 형제로 잡혀 창이 열린 채 다시 그리면 표가 최소 120px 로 짜부
- 흐름 밖(position fixed · absolute) 형제 = 자리 안 씀
- 부품 모음 견본(화면 끝 표 · 견본 창): 전 794 → 120px · 뒤 794 → 794px(밝음 · 어두움)
- 시험 test_202_1 가림막 줄 덧붙임

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 17:14:51 +09:00
co-authored by Claude Opus 5.5
parent 1bb3b43064
commit a8cf79cee0
3 changed files with 19 additions and 10 deletions
+16 -9
View File
@@ -44,17 +44,19 @@ const sty = (n) => ({
paddingBottom: n.css.paddingBottom ?? "0px",
borderBottomWidth: n.css.borderBottomWidth ?? "0px",
marginBottom: n.css.marginBottom ?? "0px",
position: n.css.position ?? "static",
});
const box = { exports: {} };
new Function("exports", "module", "require", "window", "document", "getComputedStyle", "ResizeObserver", js)(
box.exports,
box,
(p) => (p.endsWith(".css") ? {} : require(p)),
win,
{ body: null },
sty,
RO,
);
new Function(
"exports",
"module",
"require",
"window",
"document",
"getComputedStyle",
"ResizeObserver",
js,
)(box.exports, box, (p) => (p.endsWith(".css") ? {} : require(p)), win, { body: null }, sty, RO);
const m = box.exports;
// 문서: body(padding-bottom 8) > card(padding-bottom 12 · gap 8) > [root][avg 20][info 30][hint 40]
@@ -81,4 +83,9 @@ hint.height = 60;
observers.forEach((o) => o.fn());
out.afterHintGrow = parseFloat(root.style.maxHeight);
out.firstMinusGrow = out.first - 20;
// 열린 창 가림막(body 끝 · position fixed · 창 높이) = 아래 자리에 안 셈(707-5)
link(body, card, el("backdrop", { position: "fixed" }, 900));
out.belowWithModal = m.spaceBelow(root);
out.belowAfterGrow = 3 * 8 + 20 + 30 + 60 + 12 + 8;
console.log(JSON.stringify(out));
@@ -177,3 +177,4 @@ def test_창_끝까지_셈에_아래_안내_줄_포함():
assert r["below"] == r["belowExpected"] == 134 # 아래 줄 · 안내 줄 둘 + 여백
assert r["bottom"] == r["viewport"] # 문서 맨 아래 = 창 끝 → 페이지 스크롤 0
assert r["afterHintGrow"] == r["firstMinusGrow"] # 안내 줄이 늘면 표 칸이 그만큼 줄어듦
assert r["belowWithModal"] == r["belowAfterGrow"] # 열린 창 가림막(fixed) = 아래 자리 아님
+2 -1
View File
@@ -410,7 +410,8 @@ export function spaceBelow(el: HTMLElement): number {
for (let s = node.nextElementSibling; s; s = s.nextElementSibling) {
const h = s.getBoundingClientRect().height;
const m = getComputedStyle(s); // 203 형제 위아래 바깥 여백도(B09 안내 글 margin-top)
if (h) sum += h + gap + px(m.marginTop) + px(m.marginBottom);
const out = m.position === "fixed" || m.position === "absolute"; // 열린 창 가림막 · 알림 = 자리 안 씀
if (h && !out) sum += h + gap + px(m.marginTop) + px(m.marginBottom);
}
sum += px(own.marginBottom) + px(around.paddingBottom) + px(around.borderBottomWidth);
}