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
  • 12 years ago
  • 2 hours ago
  • 12 years ago

Installs

  • Total 33K
  • Win 20K
  • Mac 10K
  • Linux 3K
Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20
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.