"""PLAN 241-1 · 123 — B08 · B09 표 입력 칸 = 채움 색 대신 칸 안쪽 테두리.""" import re from pathlib import Path ROOT = Path(__file__).resolve().parents[2] CSS = ROOT / "ui_template" / "ui_template_data_table.css" def _rule(css: str, selector: str) -> str: m = re.search(re.escape(selector) + r" \{([^}]*)\}", css) assert m, selector return m.group(1) def test_입력_칸_채움_색_없고_안쪽_테두리(): body = _rule(CSS.read_text(encoding="utf-8"), ".ui-data-table__input") assert "background: transparent;" in body assert "background: color-mix" not in body # 옛 accent 5% 채움 없음 # 241-2 두 테마 — 진한 accent 60% + 캔버스(밝음 · 어두움 모두 캔버스 대비 3:1 넘음 · 초점 2px 와 갈림) assert ( "box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 60%, var(--color-canvas));" in body ) assert "#" not in body # 하드코딩 색 없음 — 테마 변수만 assert "border: 0;" in body # 테두리는 inset — 칸 크기 · 줄 높이 불변 assert "height: var(--dt-row-h);" in body def test_초점_테두리_그대로(): body = _rule(CSS.read_text(encoding="utf-8"), ".ui-data-table__input:focus") assert "outline: 2px solid var(--color-focus-ring);" in body assert "outline-offset: -2px;" in body def test_고친_값_색_칸_그대로(): css = (ROOT / "B09_Estimation" / "B09_Estimation_UI_Page.css").read_text(encoding="utf-8") body = _rule(css, ".b09-estimation .ui-data-table__table tbody td.is-edited") assert "color-mix(in srgb, var(--color-warning) 22%, var(--color-canvas))" in body ts = (ROOT / "B09_Estimation" / "B09_Estimation_UI_Tabs_Bill.ts").read_text(encoding="utf-8") assert '"is-edited"' in ts