openvibers/openvibe.rent Commits
City pages: readable open-on-the-site host links (#184)
Changes
@@@ -9,7 +9,7 @@ a.ew-kind:hover { border-color: var(--accent, #3b82f6); }.ew-open { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text-primary, #e6edf7); }.ew-open:focus-visible { outline: 2px solid var(--accent, #3b82f6); outline-offset: 3px; border-radius: 6px; }.ew-name { font-weight: 700; font-size: 1.05rem; }--.ew-host { font-size: .82rem; color: var(--accent-text, var(--accent, #3b82f6)); overflow-wrap: anywhere; }++.ew-host { font-size: .82rem; color: color-mix(in srgb, var(--accent, #3b82f6) 60%, var(--text-primary, #e6edf7)); overflow-wrap: anywhere; }.ew-best { margin: 0; font-size: .9rem; color: var(--text-secondary, #96a7c2); }.everywhere-here { margin: 0; padding-left: 18px; display: grid; gap: 6px; }@media (prefers-reduced-motion: reduce) { .ew-site, .ew-site:hover { transition: none; transform: none; } }nnew file mode 100644@@@ -0,0 +1,17 @@++'use strict';++/**++ * The "open on the site" host line is text, not a button: --accent-text is --accent-strong in the Vibe theme (#3472d8++ * on the #131c2e card, 3.7:1), so the host mixes the accent with the body text — readable on the dark and light themes.++ */++const assert = require('assert');++const fs = require('fs');++const path = require('path');++++const css = fs.readFileSync(path.join(__dirname, '..', 'public', 'css', 'everywhere.css'), 'utf8');++assert.match(++ css,++ /\.ew-host \{[^}]*color: color-mix\(in srgb, var\(--accent, #3b82f6\) 60%, var\(--text-primary, #e6edf7\)\)/,++ 'the host text mixes the accent with the body text'++);++assert.ok(!/\.ew-host \{[^}]*color: var\(--accent-text/.test(css), 'the host text is not the button fill');++console.log('everywhere colours: the host text is readable on dark and light');
@@ -9,7 +9,7 @@ a.ew-kind:hover { border-color: var(--accent, #3b82f6); }
@@ -9,7 +9,7 @@ a.ew-kind:hover { border-color: var(--accent, #3b82f6); }
.ew-open { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text-primary, #e6edf7); }
.ew-open { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text-primary, #e6edf7); }
.ew-open:focus-visible { outline: 2px solid var(--accent, #3b82f6); outline-offset: 3px; border-radius: 6px; }
.ew-open:focus-visible { outline: 2px solid var(--accent, #3b82f6); outline-offset: 3px; border-radius: 6px; }
.ew-name { font-weight: 700; font-size: 1.05rem; }
.ew-name { font-weight: 700; font-size: 1.05rem; }
-.ew-host { font-size: .82rem; color: var(--accent-text, var(--accent, #3b82f6)); overflow-wrap: anywhere; }
+.ew-host { font-size: .82rem; color: color-mix(in srgb, var(--accent, #3b82f6) 60%, var(--text-primary, #e6edf7)); overflow-wrap: anywhere; }
.ew-best { margin: 0; font-size: .9rem; color: var(--text-secondary, #96a7c2); }
.ew-best { margin: 0; font-size: .9rem; color: var(--text-secondary, #96a7c2); }
.everywhere-here { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.everywhere-here { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .ew-site, .ew-site:hover { transition: none; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ew-site, .ew-site:hover { transition: none; transform: none; } }
new file mode 100644
new file mode 100644
@@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
+'use strict';
+/**
+ * The "open on the site" host line is text, not a button: --accent-text is --accent-strong in the Vibe theme (#3472d8
+ * on the #131c2e card, 3.7:1), so the host mixes the accent with the body text — readable on the dark and light themes.
+ */
+const assert = require('assert');
+const fs = require('fs');
+const path = require('path');
+
+const css = fs.readFileSync(path.join(__dirname, '..', 'public', 'css', 'everywhere.css'), 'utf8');
+assert.match(
+ css,
+ /\.ew-host \{[^}]*color: color-mix\(in srgb, var\(--accent, #3b82f6\) 60%, var\(--text-primary, #e6edf7\)\)/,
+ 'the host text mixes the accent with the body text'
+);
+assert.ok(!/\.ew-host \{[^}]*color: var\(--accent-text/.test(css), 'the host text is not the button fill');
+console.log('everywhere colours: the host text is readable on dark and light');