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

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

Merged
merged 1 commit into from
Jan 23, 2012

Conversation

fat
Copy link
Contributor

@fat fat commented Jan 19, 2012

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
Member

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

@fat
Copy link
Contributor Author

fat commented Jan 20, 2012

yeah... let me rethink this

@fat
Copy link
Contributor Author

fat commented Jan 20, 2012

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
Member

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

@fat
Copy link
Contributor Author

fat commented Jan 21, 2012

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