"""245-1 병합 표 호버 정리 — 병합 칸(is-merged)은 줄 강조(호버 · 이동해 온 줄 · 줄무늬) 밖. 규칙 (가) = 병합 칸은 칠하지 않고 그 줄 나머지 칸만. 같은 세기 선택자라 병합 칸 규칙이 뒤에 와야 이김. """ import re from pathlib import Path ROOT = Path(__file__).resolve().parents[2] CSS = (ROOT / "ui_template" / "ui_template_data_table.css").read_text("utf-8") MERGED = ".ui-data-table__table tbody tr td.is-merged {" def _at(sel: str) -> int: i = CSS.find(sel) assert i >= 0, sel return i def test_병합_칸_줄_강조_밖(): body = CSS[_at(MERGED) :].split("}", 1)[0] assert "background: var(--color-canvas);" in body assert "box-shadow: none;" in body def test_호버_고른줄_줄무늬_뒤에_옴(): at = _at(MERGED) for sel in ( ".ui-data-table__table tbody tr:hover td {", ".ui-data-table__table tbody tr.is-focus td {", ".ui-data-table__table tbody tr.is-alt td {", ): assert _at(sel) < at, sel def test_병합_칸_글_위_정렬_그대로(): assert re.search(r"td\.is-merged \{\s*vertical-align: top;", CSS) def test_B09_빨강_범위는_병합_칸에도_남음(): page = (ROOT / "B09_Estimation" / "B09_Estimation_UI_Page.css").read_text("utf-8") # 빨강(is-pick)은 .b09-estimation 이 붙어 더 셈 — 병합 칸 box-shadow: none 에 안 덮임 assert ".b09-estimation .ui-data-table__table tbody tr.is-pick td {" in page