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

Feature Request: lowercase all hex values (and possibly other attribute values?) #343

Closed
albell opened this issue Apr 15, 2015 · 4 comments

Comments

@albell
Copy link

albell commented Apr 15, 2015

Reasons:

  • Gzipping is more efficient with consistent, repeated character case.
  • There are some browser bugs in which uppercase attribute values throw errors.
  • All lowercase is a strong convention for most markup and css.
  • It would make find-and-replace operations consistent.
@GreLI
Copy link
Member

GreLI commented Apr 15, 2015

Well, all these reasons are debatable, but as an option it may be.

@albell
Copy link
Author

albell commented Apr 15, 2015

Well, there's no debate about gzipping. Compressors get more string matches when case is consistent. Some data:

http://www.websiteoptimization.com/speed/tweak/lowercase/

And in terms of the overall web ecosystem the bias seems to be strongly towards lower case. If you disagree or have conflicting data on this I'd love to see it. I can't find a single CSS styleguide on the web that recommends upper case anything.

@GreLI
Copy link
Member

GreLI commented Apr 15, 2015

Sure, but most values are in lowercase already. Will it give any significant profit? 7-zip or zopfli can give much more. That's why I say it debatable.

@SethFalco
Copy link
Member

Thanks for reporting the issue.

The specific scenario presented here regarding hex colors has been addressed in #1692 and is already in the latest release.

I have not acted on the proposed browser bug for spreadMethod for now, as I see nothing suggesting PAD in uppercase is an acceptable value, and converting an invalid value to a valid one would be a breaking/visible change in the SVG.

If you have any concrete examples of safe case conversions we can do, feel free to open issues, and we can look into them. As the issue as it is written now is fairly open-ended, I'll take it more as a consideration maintainers must have in future rather than something to act on immediately.

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

3 participants