Polish mobile and web experience
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/// <reference types="bun" />
|
||||
|
||||
import { describe, expect, test } from "bun:test";
|
||||
|
||||
import { resolveActionForeground } from "../lib/action-contrast";
|
||||
|
||||
describe("swipe action contrast", () => {
|
||||
test("uses dark content on bright dark-mode action colors", () => {
|
||||
expect(resolveActionForeground("#FAFAFA", "#FFFFFF")).toBe("#18181B");
|
||||
expect(resolveActionForeground("#A1A1AA", "#FFFFFF")).toBe("#18181B");
|
||||
expect(resolveActionForeground("#4ADE80", "#FFFFFF")).toBe("#18181B");
|
||||
expect(resolveActionForeground("#FBBF24", "#FFFFFF")).toBe("#18181B");
|
||||
expect(resolveActionForeground("#F87171", "#FFFFFF")).toBe("#18181B");
|
||||
});
|
||||
|
||||
test("keeps white content on the light-mode primary action", () => {
|
||||
expect(resolveActionForeground("#18181B", "#FFFFFF")).toBe("#FFFFFF");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user