diff --git a/resources/tester/test_241_1_input_cell_border.py b/resources/tester/test_241_1_input_cell_border.py new file mode 100644 index 000000000..b40553c34 --- /dev/null +++ b/resources/tester/test_241_1_input_cell_border.py @@ -0,0 +1,36 @@ +"""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 "color-mix" not in body # 옛 accent 5% 채움 없음 + assert "box-shadow: inset 0 0 0 1px var(--color-accent);" 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 diff --git a/ui_template/ui_template_data_table.css b/ui_template/ui_template_data_table.css index f726d0827..0d20ed184 100644 --- a/ui_template/ui_template_data_table.css +++ b/ui_template/ui_template_data_table.css @@ -158,7 +158,7 @@ box-shadow: inset 0 -2px 0 var(--color-accent); } -/* 고칠 칸(PLAN 121) — 칸 가득 글 상자 · 숫자 오른쪽 맞춤 */ +/* 고칠 칸(PLAN 121 · 241-1) — 칸 가득 글 상자 · 숫자 오른쪽 맞춤 · 입력 칸 표시 = 채움 색 없이 칸 안쪽 테두리(칸 크기 불변) */ .ui-data-table__table td.is-edit { padding: 0; } @@ -168,7 +168,8 @@ height: var(--dt-row-h); padding: 0 var(--spacing-8); border: 0; - background: color-mix(in srgb, var(--color-accent) 5%, var(--color-canvas)); + background: transparent; + box-shadow: inset 0 0 0 1px var(--color-accent); color: inherit; font: inherit; font-variant-numeric: tabular-nums;