Skip to content

newline all selectors whose combined length is greater than 25 chars - #585

Merged
cloudhead merged 1 commit into
less:masterfrom
fat:newline-selectors
Jan 23, 2012
Merged

cloudhead merged 1 commit into
less:masterfrom
fat:newline-selectors

Conversation

@fat

@fat fat commented Jan 19, 2012

Copy link
Copy Markdown
Contributor

limit length of comma separated selectors to 25 chars before breaking out to separate lines.

Not totally sure if 25 is the best length - or if we should always newline selectors...

@cloudhead

Copy link
Copy Markdown
Member

Hmm, but now you're doing an extra join() for each selector, which could be expensive.. can the join be cached somehow?

@fat

fat commented Jan 20, 2012

Copy link
Copy Markdown
Contributor Author

yeah... let me rethink this

@fat

fat commented Jan 20, 2012

Copy link
Copy Markdown
Contributor Author

while loop seems to be the fastest thing i could come up with...

http://jsperf.com/joining-selectors

or we could just always newline? which would actually be the fastest

@cloudhead

Copy link
Copy Markdown
Member

tbh yea, I'd just always newline when there's more than 1 selector.. anything else is arbitrary.

@fat

fat commented Jan 21, 2012

Copy link
Copy Markdown
Contributor Author

yeah - that was my first instinct too - good call

cloudhead pushed a commit that referenced this pull request Jan 23, 2012
newline all selectors whose combined length is greater than 25 chars
@cloudhead
cloudhead merged commit 5c52f45 into less:master Jan 23, 2012
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