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

Consider consolidating the class: notation #74

Closed
jquesada2016 opened this issue Nov 12, 2022 · 1 comment
Closed

Consider consolidating the class: notation #74

jquesada2016 opened this issue Nov 12, 2022 · 1 comment

Comments

@jquesada2016
Copy link
Contributor

Through experimentation, I've noticed that using CSS minification tooling that analyzes the source code for classes, such as TailwindCSS, purge CSS, and Atomic fail to recognize classes which start with class-, but do work with classes that start with class: due to notations from JS frameworks, such as Svelte. It might be a good idea to consolidate class names to always use class:, instead of having two seperate notations. Ideally, this should also be extended to on:, but is outside the scope of this issue.

These tools can be made to recognize classes prefixed by class-, but it might not be obvious to users.

@gbj
Copy link
Collaborator

gbj commented Nov 12, 2022

The separate class-whatever and on-whatever notations were due to a limitation of syn-rsx, which is the crate used to parse the view macro, and which only allowed all dashes or all colons in an attribute name, so we couldn't have custom event names like on:my-event

I've had a PR merged into syn-rsx to allow mixed colons and dashes but need to do the work to upgrade to syn-rsx 0.9 if there are any other breaking changes (See issue #57)

So, I'm going to close this for now as it will be resolved once I've closed that other issue and can consolidate the syntax again.

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

2 participants