ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

CSSFormat

by hdemirchian ST2

Sublime Text plugin to format CSS files

Details

  • 2013.05.31.15.27.48
  • github.​com
  • github.​com
  • 11 years ago
  • 55 minutes ago
  • 12 years ago

Installs

  • Total 33K
  • Win 20K
  • Mac 10K
  • Linux 3K
May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

This plug-in was generated for Lamps Plus Web development team for helping them with formatting their CSS files according to their own set of standards. When installed, it will create a menu item called “LP CSS Formatter <version#>” under Edit menu.
Here is the list of standards it follows:
• All curly braces should have a leading and trailing space
• All colons should have a leading trailing space
• Last parameter inside curly braces (even there is only one parameter) should have a trailing semicolon
• All parameters inside curly braces should be sorted alphabetically
• After sorting the parameters, all high priority parameters (parameters starting with ‘-’) should be moved to the top of the list and all low priority parameters (commented lines and parameters starting with ‘*’ and ‘_’) should be moved to the bottom of the list
• Statements containing less than 4 parameters should be displayed on one line
• Statements containing 4 or more parameters should be displayed in multiple lines.

Updates:
• Fixed the bug of removing the last line if the selicolon was missing - sorry for taking so long to fix this.