Skip to content

Checkbox display issue with CSP enabled #102

Closed
@vhscom

Description

@vhscom

What version of @tailwindcss/forms are you using?

v0.4.0

What version of Node.js are you using?

v17.3.0

What browser are you using?

Ungoogled Chromium

What operating system are you using?

Arch Linux

Reproduction repository

https://github.com/vhscom/repro-tailwind-forms-checkbox-issue

Describe your issue

Dependent on CSP settings checkboxes do not display correctly due to use of data scheme.

Here's what the checkbox looks like with strict CSP enabled:

repro

Issue occurs because tailwindcss-forms checkbox uses a base64-encoded SVG background image. To validate this is the case simply build the repro with pnpm i && pnpm dev -- --open then open svelte.config.js and remove the CSP setting (browser will auto-reload showing the checkbox).

Is it possible to add a fallback experience for apps blocking unsafe evaluation of data attributes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions