feat: add view-body flex layout and --bg-surface variable

This commit is contained in:
Brian Krabach
2026-03-27 16:44:20 -07:00
parent 1023c14480
commit 0f95f5aab0
2 changed files with 55 additions and 0 deletions
+45
View File
@@ -90,3 +90,48 @@ def test_css_session_pill():
def test_css_reduced_motion():
css = read_css()
assert "prefers-reduced-motion" in css
def test_css_bg_surface_variable():
"""--bg-surface variable must exist in :root."""
css = read_css()
assert "--bg-surface: #1A1F2B" in css
def test_css_view_body_flex_layout():
"""`.view-body` must have flex row layout properties."""
css = read_css()
assert ".view-body" in css
# Extract the .view-body rule block
view_body_idx = css.index(".view-body")
block_start = css.index("{", view_body_idx)
block_end = css.index("}", block_start)
block = css[block_start:block_end]
assert "display: flex" in block
assert "flex-direction: row" in block
assert "flex: 1" in block
assert "min-height: 0" in block
assert "overflow: hidden" in block
def test_css_view_body_before_terminal_container():
""".view-body rule must appear before .terminal-container in the file."""
css = read_css()
assert ".view-body" in css
assert ".terminal-container" in css
assert css.index(".view-body") < css.index(".terminal-container")
def test_css_terminal_container_min_width():
""".terminal-container must have min-width: 0 to prevent flex overflow."""
css = read_css()
terminal_idx = css.index(".terminal-container")
block_start = css.index("{", terminal_idx)
block_end = css.index("}", block_start)
block = css[block_start:block_end]
assert "min-width: 0" in block
# Existing properties preserved
assert "flex: 1" in block
assert "overflow: hidden" in block
assert "background: #000" in block
assert "padding: 0 4px" in block