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

lessen restrictions on class names to support tailwindcss styling #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryanbalsdon
Copy link

Fixes #42

It looks like there are two very different grammars defined against class names for CSS and for HTML. Where CSS restricts most special characters, HTML only restricts whitespace characters (because it's a space-separated list).

This patch switches the class name validation to use HTML-style, anything-goes class names (that have no spaces). These non-CSS-compliant class names can still be used from within Javascript and are used heavily by TailwindCSS.

Copy link

@shadows-withal shadows-withal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit, looks good otherwise

typed-html/src/types/class.rs Outdated Show resolved Hide resolved
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.

Support for Tailwinds CSS class names
2 participants