openvibers/openvibe.rent Commits
Price moves use the readable status text colours (#182)
Changes
@@@ -86,8 +86,8 @@.rent-move strong { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--text-primary, #e6edf7); }.rent-move .rent-move-none { font-size: .95rem; color: var(--text-secondary, #96a7c2); }.rent-move-note { display: block; font-size: .76rem; color: var(--text-muted, #7386a3); }--.rent-move strong.rent-move-up { color: var(--warning, #f59e0b); }--.rent-move strong.rent-move-down { color: var(--success, #22c55e); }++.rent-move strong.rent-move-up { color: var(--warning-text, #f59e0b); }++.rent-move strong.rent-move-down { color: var(--success-text, #22c55e); }.listing-report-mini { margin-top: 6px; }.listing-report-mini button { font-family: inherit; line-height: inherit; cursor: pointer; background: transparent; }/* A figure's source in its own card (market outcome 5), and the one line on who pays us (outcome 3) */nnew file mode 100644@@@ -0,0 +1,17 @@++'use strict';++/**++ * Price-move words are text, not fills: the status fill colours read 2:1 on a light theme (Daylight's white),++ * so up and down use the theme's readable --warning-text / --success-text pair.++ */++const assert = require('assert');++const fs = require('fs');++const path = require('path');++++const css = fs.readFileSync(path.join(__dirname, '..', 'public', 'css', 'cities.css'), 'utf8');++assert.match(css, /\.rent-move strong\.rent-move-up \{ color: var\(--warning-text,/);++assert.match(css, /\.rent-move strong\.rent-move-down \{ color: var\(--success-text,/);++assert.ok(++ !/\.rent-move strong\.rent-move-(up|down) \{ color: var\(--(warning|success),/.test(css),++ 'no price-move word uses the fill colour'++);++console.log('move colours: the status text pair is used');
@@ -86,8 +86,8 @@
@@ -86,8 +86,8 @@
.rent-move strong { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--text-primary, #e6edf7); }
.rent-move strong { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--text-primary, #e6edf7); }
.rent-move .rent-move-none { font-size: .95rem; color: var(--text-secondary, #96a7c2); }
.rent-move .rent-move-none { font-size: .95rem; color: var(--text-secondary, #96a7c2); }
.rent-move-note { display: block; font-size: .76rem; color: var(--text-muted, #7386a3); }
.rent-move-note { display: block; font-size: .76rem; color: var(--text-muted, #7386a3); }
-.rent-move strong.rent-move-up { color: var(--warning, #f59e0b); }
-.rent-move strong.rent-move-down { color: var(--success, #22c55e); }
+.rent-move strong.rent-move-up { color: var(--warning-text, #f59e0b); }
+.rent-move strong.rent-move-down { color: var(--success-text, #22c55e); }
.listing-report-mini { margin-top: 6px; }
.listing-report-mini { margin-top: 6px; }
.listing-report-mini button { font-family: inherit; line-height: inherit; cursor: pointer; background: transparent; }
.listing-report-mini button { font-family: inherit; line-height: inherit; cursor: pointer; background: transparent; }
/* A figure's source in its own card (market outcome 5), and the one line on who pays us (outcome 3) */
/* A figure's source in its own card (market outcome 5), and the one line on who pays us (outcome 3) */
new file mode 100644
new file mode 100644
@@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
+'use strict';
+/**
+ * Price-move words are text, not fills: the status fill colours read 2:1 on a light theme (Daylight's white),
+ * so up and down use the theme's readable --warning-text / --success-text pair.
+ */
+const assert = require('assert');
+const fs = require('fs');
+const path = require('path');
+
+const css = fs.readFileSync(path.join(__dirname, '..', 'public', 'css', 'cities.css'), 'utf8');
+assert.match(css, /\.rent-move strong\.rent-move-up \{ color: var\(--warning-text,/);
+assert.match(css, /\.rent-move strong\.rent-move-down \{ color: var\(--success-text,/);
+assert.ok(
+ !/\.rent-move strong\.rent-move-(up|down) \{ color: var\(--(warning|success),/.test(css),
+ 'no price-move word uses the fill colour'
+);
+console.log('move colours: the status text pair is used');