aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/style.css2
-rw-r--r--packages/meshbay-hub/tests/test_match_result_text.py20
2 files changed, 22 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/style.css b/packages/meshbay-hub/src/meshbay_hub/static/style.css
index de4f2aea..6af3c0b7 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/style.css
+++ b/packages/meshbay-hub/src/meshbay_hub/static/style.css
@@ -4682,6 +4682,8 @@ h2 .gn-owner, h3 .gn-owner { font-size: 0.55em; }
border: 1px solid transparent;
border-radius: 6px;
background: none;
+ color: inherit;
+ font: inherit;
text-align: left;
cursor: pointer;
}
diff --git a/packages/meshbay-hub/tests/test_match_result_text.py b/packages/meshbay-hub/tests/test_match_result_text.py
new file mode 100644
index 00000000..d48c7df3
--- /dev/null
+++ b/packages/meshbay-hub/tests/test_match_result_text.py
@@ -0,0 +1,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")