cssbeautify icon indicating copy to clipboard operation
cssbeautify copied to clipboard

new line for comments and id selectors

Open scharmetant opened this issue 13 years ago • 5 comments

Hi, lib working great, exept for theses: I have noticed that cssbeautify will not create a new line for comments in the CSS: /* My comment here */ .a-selector {etc..

Also, same thing happens with slectors starting by #:

a-unique-id span { etc...

scharmetant avatar Oct 18 '11 14:10 scharmetant

Thanks for the report! We will tackle this in the earliest convenient time.

ariya avatar Oct 18 '11 14:10 ariya

Selectors starting with # should work now!

ariya avatar Oct 19 '11 18:10 ariya

Nice, still doesn't shoot when a comment is ahead though;

#search-submit { <-- this is OK width: 50px; height: 22px; border: none; background: #B9B9B9; color: #000000; } /* Menu */#menu { <-- comment stay inline, as well as next #selector width: 940px; height: 80px; margin: 0 auto; padding: 0; }

I have spent more time experiencing your script, it seems efficient, unobtrusive and fast, by far the best I found for the job. I will post an issue with 1 or 2 killer features you may add to make it Top of the world

scharmetant avatar Oct 19 '11 20:10 scharmetant

The comment-followed-by-# issue is because block comment in general has not fixed yet (optionally to place it into its own separated line). This is next in the list.

More feedback is welcomed :)

ariya avatar Oct 19 '11 20:10 ariya

Do you have an idea on how to place the comment? I played with different ideas on where to split and indent the comment, it seems quite challenging to get the heuristics right.

ariya avatar Oct 26 '11 19:10 ariya