blob: d48c7df3c72e82b3c1561aee77cd84ada85e9e9a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
"""
A TMDB match result is a `<button>`, and a button does not inherit the page's
text color: it takes the browser's `buttontext`, which follows the system's
dark mode, not MeshBay's theme. With the system dark and the theme light, the
titles were white on the panel's white. The row inherits the panel's color.
"""
import re
from pathlib import Path
STYLE = (Path(__file__).resolve().parents[1] / "src" / "meshbay_hub"
/ "static" / "style.css")
def test_a_match_result_inherits_the_panels_text_color():
css = STYLE.read_text(encoding="utf-8")
rule = re.search(r"^\.video-search-result \{([^}]*)\}", css, re.M)
assert rule, "no .video-search-result rule"
assert re.search(r"^\s*color:\s*inherit;", rule.group(1), re.M), (
"the result button keeps the browser's button text color")
|