Answer stability round 1: 0 🔴, 2 🟡 (0 misread); explain the failure correctly and test each stylesheet
This commit is contained in:
@@ -6,9 +6,10 @@ import { fileURLToPath } from "node:url";
|
||||
|
||||
const cssDir = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "public", "css");
|
||||
|
||||
test("no stylesheet declares an oklch() colour, which an engine below Chromium 111 drops", () => {
|
||||
// A dropped custom property leaves var(--accent) invalid: white text on no background.
|
||||
for (const file of readdirSync(cssDir).filter((f) => f.endsWith(".css"))) {
|
||||
assert.ok(!/oklch\(/.test(readFileSync(join(cssDir, file), "utf8")), `${file} declares oklch()`);
|
||||
}
|
||||
});
|
||||
// A custom property holding oklch() passes unchecked on an engine below Chromium 111, so the
|
||||
// var() that reads it is invalid at computed-value time: white text on no background.
|
||||
for (const file of readdirSync(cssDir).filter((f) => f.endsWith(".css"))) {
|
||||
test(`${file} declares no oklch() colour`, () => {
|
||||
assert.ok(!/oklch\(/i.test(readFileSync(join(cssDir, file), "utf8")));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user