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

Sort/normalize class tokens #267

Closed
samme opened this issue Sep 15, 2014 · 3 comments
Closed

Sort/normalize class tokens #267

samme opened this issue Sep 15, 2014 · 3 comments

Comments

@samme
Copy link

samme commented Sep 15, 2014

Like #4, this would help compression (and readability).

<a class="c a b"></a>
<a class="a b c"></a>
@duncanbeevers
Copy link
Collaborator

I'm concerned about this affecting class names containing templates such as this.

<a class="btn {{#if loading}}loading{{/if}}"></a>

The tokenization btn, {{#if, loading}}loading{{/if}} is clearly incorrect.

I'd also be interested in seeing the compression difference this makes. My suspicion is not much, but I'd be happy to be shown wrong.

@samme
Copy link
Author

samme commented Sep 17, 2014

I was imagining an option (default: false) since it's not suitable for every case.

@alexlamsl
Copy link
Collaborator

I do wonder who write class names in random orders inside a HTML page to begin with.

OTOH, implementing this is probably simple enough, and gated by a flag makes it pretty safe as well.

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

No branches or pull requests

4 participants