openvibers/openvibe.games Commits
Creator world cards follow the reader's theme (#246)
Changes
@@@ -163,9 +163,9 @@gap: 8px;min-width: 0;padding: 16px;-- border: 1px solid var(--border);++ border: 1px solid var(--border, #1f2d47);border-radius: 16px;-- background: var(--bg-raised);++ background: var(--bg-card, #101828);}.card h3 {margin: 0;nnew file mode 100644@@@ -0,0 +1,18 @@++import { describe, expect, it } from 'vitest'++import { readFileSync } from 'node:fs'++import { fileURLToPath } from 'node:url'++++const client = fileURLToPath(new URL('../../../client/', import.meta.url))++const page = readFileSync(`${client}worlds.html`, 'utf8')++++/**++ * The creator worlds list follows the reader's theme: a fixed dark panel under the theme's secondary text read++ * 2.1:1 on Daylight. The card takes the theme's card and border; the dark look is only the fallback.++ */++describe('the creator worlds list on a light theme', () => {++ it('draws its cards on the theme, not a fixed dark panel', () => {++ expect(page).toMatch(/\.card \{[^}]*background: var\(--bg-card, #101828\);/)++ expect(page).toMatch(/\.card \{[^}]*border: 1px solid var\(--border, #1f2d47\);/)++ expect(page).not.toMatch(/\.card \{[^}]*background: var\(--bg-raised\)/)++ })++})nnew file mode 100644@@@ -0,0 +1,3 @@++// file: 'apps/server/src/net/worldsPage.test.ts'++// covers: 'apps/server/src/net'++// Generated by node test/run.js --index; do not edit.
@@ -163,9 +163,9 @@
@@ -163,9 +163,9 @@
gap: 8px;
gap: 8px;
min-width: 0;
min-width: 0;
padding: 16px;
padding: 16px;
- border: 1px solid var(--border);
+ border: 1px solid var(--border, #1f2d47);
border-radius: 16px;
border-radius: 16px;
- background: var(--bg-raised);
+ background: var(--bg-card, #101828);
}
}
.card h3 {
.card h3 {
margin: 0;
margin: 0;
new file mode 100644
new file mode 100644
@@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
+import { describe, expect, it } from 'vitest'
+import { readFileSync } from 'node:fs'
+import { fileURLToPath } from 'node:url'
+
+const client = fileURLToPath(new URL('../../../client/', import.meta.url))
+const page = readFileSync(`${client}worlds.html`, 'utf8')
+
+/**
+ * The creator worlds list follows the reader's theme: a fixed dark panel under the theme's secondary text read
+ * 2.1:1 on Daylight. The card takes the theme's card and border; the dark look is only the fallback.
+ */
+describe('the creator worlds list on a light theme', () => {
+ it('draws its cards on the theme, not a fixed dark panel', () => {
+ expect(page).toMatch(/\.card \{[^}]*background: var\(--bg-card, #101828\);/)
+ expect(page).toMatch(/\.card \{[^}]*border: 1px solid var\(--border, #1f2d47\);/)
+ expect(page).not.toMatch(/\.card \{[^}]*background: var\(--bg-raised\)/)
+ })
+})
new file mode 100644
new file mode 100644
@@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
+// file: 'apps/server/src/net/worldsPage.test.ts'
+// covers: 'apps/server/src/net'
+// Generated by node test/run.js --index; do not edit.