Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions web/src/shared/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,30 @@
@apply bg-background text-foreground antialiased;
font-family: "Inter Variable", Inter, "Avenir Next", "Segoe UI", sans-serif;
}

/*
* Tailwind v4's preflight no longer sets `cursor: pointer` on buttons.
* Restore it for clearly actionable elements so hover affordance is
* consistent with the desktop client. Disabled / aria-disabled elements
* keep the default cursor; explicit `cursor-*` utilities still win because
* utilities are emitted after the base layer.
*/
button:not(:disabled),
a[href],
summary,
[role="button"]:not([aria-disabled="true"]),
[role="menuitem"]:not([aria-disabled="true"]),
[role="menuitemcheckbox"]:not([aria-disabled="true"]),
[role="menuitemradio"]:not([aria-disabled="true"]),
[role="tab"]:not([aria-disabled="true"]),
[role="link"] {
cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
cursor: default;
}
}

/*
Expand Down
17 changes: 17 additions & 0 deletions web/tests/e2e/workspace-appearance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ import { nsecEncode } from "nostr-tools/nip19";
import { v2 as nip44 } from "nostr-tools/nip44";
import { installWorkspaceRelayMock } from "./helpers/workspaceRelayMock";

test("interactive controls expose the expected cursor affordance", async ({
page,
}) => {
await page.goto("/");

const signInButton = page.getByRole("button", {
name: "Sign in with recovery key",
});
await expect(signInButton).toHaveCSS("cursor", "pointer");
await expect(page.getByLabel("Display name")).toHaveCSS("cursor", "text");

await signInButton.evaluate((button: HTMLButtonElement) => {
button.disabled = true;
});
await expect(signInButton).toHaveCSS("cursor", "default");
});

test("workspace appearance publishes the desktop-compatible encrypted coordinate", async ({
page,
}) => {
Expand Down
Loading