Merge remote-tracking branch 'origin/sub_laptop_4' into main_laptop_1
This commit is contained in:
@@ -360,7 +360,8 @@
|
||||
* 값은 theme `--panel-control-h` 한 곳(좌측 패널 공용 양식이 함께 씀 · 269). 기준은 조정창에서 옮겨 온 행의
|
||||
* 컨트롤 높이(26px)다 — 사용자가 그 크기를 기준으로 정했다. */
|
||||
.b05-structure-section,
|
||||
.b05-drainage__facility {
|
||||
.b05-drainage__facility,
|
||||
.b05-route__irregular-clear {
|
||||
--b05-control-h: var(--panel-control-h);
|
||||
}
|
||||
|
||||
@@ -588,7 +589,8 @@
|
||||
}
|
||||
|
||||
/* 「구조물 배치」 맨 아래 [추가] · [삭제] · [리셋] 줄(205-1) — 단추 높이 = 상자 안 작은 단추(`--b05-control-h`) ·
|
||||
* 폼이 길어도 스크롤 영역 아래 끝에 붙어 늘 보임(자리 고정 · 뒤 내용이 비치지 않게 불투명 배경) */
|
||||
* 폼이 길어도 스크롤 영역 아래 끝에 붙어 늘 보임(자리 고정 · 뒤 내용이 비치지 않게 불투명 배경) ·
|
||||
* 목록 맨 아래 [구조물 전체 삭제]도 같은 높이(313-2) */
|
||||
.b05-structure-section .b05-route__irregular-actions {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
@@ -596,7 +598,8 @@
|
||||
background: var(--color-surface-raised);
|
||||
}
|
||||
|
||||
.b05-structure-section .b05-route__irregular-actions > button {
|
||||
.b05-structure-section .b05-route__irregular-actions > button,
|
||||
.b05-route__irregular-clear > button {
|
||||
box-sizing: border-box;
|
||||
height: var(--b05-control-h);
|
||||
min-height: 0;
|
||||
|
||||
@@ -91,3 +91,52 @@ def test_CSS_단추_줄():
|
||||
css = _read("B05_Profile", "B05_Profile_UI_Style.css")
|
||||
assert ".b05-route__irregular-clear {" in css
|
||||
assert ".b05-route__irregular-clear .b05-route__irregular-btn {" in css
|
||||
|
||||
|
||||
# ── 313-2 실제 브라우저(정적 쪽 · 서버 불필요) — 위 [삭제] 단추와 같은 높이 · 같은 위험 색 ──
|
||||
|
||||
MARKUP = (
|
||||
"<div style='width:320px'>"
|
||||
"<section class='b05-route__panel-section b05-structure-section ui-collapsible"
|
||||
" ui-sidebar-section ui-panel-form'><div class='b05-route__irregular-actions'>"
|
||||
"<button class='b05-route__irregular-btn is-primary'>추가</button>"
|
||||
"<button class='b05-route__irregular-btn is-danger' id='top'>삭제</button>"
|
||||
"<button class='b05-route__irregular-btn'>리셋</button></div></section>"
|
||||
"<div class='b05-route__dock ui-sidebar-actions'><ul class='b05-route__irregular-list'>"
|
||||
"<li class='b05-route__irregular-item'><strong>NO.1</strong><span>배수관</span></li>"
|
||||
"<li class='b05-route__irregular-clear'><button type='button'"
|
||||
" class='b05-route__irregular-btn is-danger' id='clear'>구조물 전체 삭제</button></li>"
|
||||
"</ul></div></div>"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("theme", ["light", "dark"])
|
||||
def test_단추_높이_위_삭제와_같음(theme):
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
css = "".join(
|
||||
p.read_text("utf-8")
|
||||
for folder in ("ui_template", "B05_Profile", "B06_Section")
|
||||
for p in sorted((ROOT / folder).glob("*.css"))
|
||||
)
|
||||
html = (
|
||||
f"<!doctype html><html data-theme='{theme}'><head><style>{css}</style></head>"
|
||||
f"<body>{MARKUP}</body></html>"
|
||||
)
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(channel="msedge", headless=True)
|
||||
page = browser.new_page()
|
||||
page.set_content(html)
|
||||
out = page.evaluate(
|
||||
"""() => ['top', 'clear'].map((id) => {
|
||||
const el = document.getElementById(id);
|
||||
return [el.getBoundingClientRect().height, getComputedStyle(el).color];
|
||||
})"""
|
||||
)
|
||||
browser.close()
|
||||
(top_h, top_color), (clear_h, clear_color) = out
|
||||
assert top_h == clear_h, out # 두 단추 높이 px 같음(공용 --panel-control-h)
|
||||
assert clear_color == top_color, out # 위험 색 꼴 그대로
|
||||
css_rule = _read("B05_Profile", "B05_Profile_UI_Style_Structures.css")
|
||||
assert ".b05-route__irregular-clear > button {" in css_rule
|
||||
assert "px" not in css_rule.split(".b05-route__irregular-clear {")[-1].split("}")[0]
|
||||
|
||||
Reference in New Issue
Block a user