Skip to content

Explicitly specify CSS export#533

Open
tobias-edwards wants to merge 1 commit intoemilkowalski:mainfrom
tobias-edwards:main
Open

Explicitly specify CSS export#533
tobias-edwards wants to merge 1 commit intoemilkowalski:mainfrom
tobias-edwards:main

Conversation

@tobias-edwards
Copy link

@tobias-edwards tobias-edwards commented Dec 28, 2024

Resolves #465

Explicitly specifies CSS export, inspired by vitejs/vite#2657 (comment)

However, vaul will always attempt to inject its CSS via <style>. A CSP policy that rejects 'unsafe-inline' will log an error here. Would be cleaner to conditionally turn this off or pass a nonce.

Usage (in Remix)

// app/root.tsx
import type { LinksFunction } from "@remix-run/node";
import vaulStyles from "vaul/style.css?url";

export const links: LinksFunction = () => [
  { rel: "stylesheet", href: vaulStyles },
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to import vaul/style.css

1 participant