Skip to content

Remove optional quotes from CSS attribute selectors#556

Closed
antibland wants to merge 1 commit into
necolas:masterfrom
antibland:remove_attr_selectors_quotes
Closed

Remove optional quotes from CSS attribute selectors#556
antibland wants to merge 1 commit into
necolas:masterfrom
antibland:remove_attr_selectors_quotes

Conversation

@antibland
Copy link
Copy Markdown

No description provided.

@battaglr
Copy link
Copy Markdown

@antibland, hi! IMO that kind of optimizations should be performed by minifiers.

@antibland
Copy link
Copy Markdown
Author

@battaglr Maybe minifiers should do this, but there is no guarantee that all will. Also, This repo appears to be something of a starting point for new projects. Omitting the quotes is a style choice and shaves a few extra bytes.

@battaglr
Copy link
Copy Markdown

@antibland, I'm sorry if I was a bit blunt.

This is indeed just a matter of style choice. This project uses an explicit style guideline and an implicit one.

That being said, if we were up to do simple things that would save a few bites, we could avoid the last semi-colon in a rule, or avoid leaving spaces between the selector and the bracket. But I think that's the job of a minifier, not our job.

In any case, remember that the size of "author" code rarely matters; but if you were comparing the two versions, would be fair to compare the gzipped size:

  • With quotes: 2115 bytes.
  • Without quotes: 2111 bytes.

IMO in this context 4 bytes are no real difference.

@antibland antibland closed this Mar 22, 2016
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.

2 participants