Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow colons in class names #38

Open
hakoerber opened this issue May 7, 2023 · 0 comments
Open

Allow colons in class names #38

hakoerber opened this issue May 7, 2023 · 0 comments

Comments

@hakoerber
Copy link

hakoerber commented May 7, 2023

When using class names that contain colons (:), I get the following error:

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: "class name can only contain alphanumerics, dash, dot and underscore"'

This is coming from this check.

Now, I did not find anything in the HTML spec that actually forbids colons (actually, it allows everything but whitespace). At least colons are quite frequently used for pseudo classes in tailwind (e.g. hover:bg-purple-100).

So I propose to allow colons for classes (and also ids for good measure, it uses the same check). If you agree, I'll open a pull request, should be easy to change.

UPDATE: I changed it in my fork, works like a charm. I'll open a PR if you want.

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

No branches or pull requests

1 participant