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
  • 6 days ago
  • 12 years ago

Installs

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