CSS Format
CSS Formatting for Sublime Text
Details
Installs
- Total 178K
- Win 121K
- Mac 41K
- Linux 16K
| Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | 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 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 2 | 1 | 3 | 2 | 2 | 1 | 6 | 6 | 6 | 5 | 1 | 0 | 1 | 2 | 3 | 2 | 3 | 3 | 2 | 1 | 2 | 1 | 3 | 7 | 2 | 2 | 0 | 2 | 3 | 1 | 10 | 1 | 4 | 2 | 1 | 1 | 3 | 3 | 3 | 3 | 0 | 3 | 3 | 6 | 4 |
| Mac | 1 | 2 | 0 | 2 | 3 | 1 | 2 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 1 | 4 | 1 | 1 | 2 | 0 | 0 | 4 | 3 | 2 | 7 | 1 | 2 | 0 | 2 | 4 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 2 | 0 | 0 | 1 |
| Linux | 0 | 2 | 1 | 1 | 1 | 3 | 0 | 0 | 1 | 1 | 2 | 1 | 0 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 | 1 | 1 |
Readme
- Source
- raw.githubusercontent.com
CSS Formatter for Sublime Text
Description
CSS Format is a CSS formatting plugin for Sublime Text, you can convert CSS/SASS/SCSS/LESS code to Expanded, Compact or Compressed format. CSS Format is just only a formatter, do not supports grammar check and auto correct feature.
Example:
Expanded:
body { background: #fff; font: 12px/2em Arial, Helvetica, sans-serif; } ol, ul, li { margin: 0; padding: 0; } a { color: rgba(65, 131, 196, 0.8); }
Expanded (Break Selectors):
body { background: #fff; font: 12px/2em Arial, Helvetica, sans-serif; } ol, ul, li { margin: 0; padding: 0; } a { color: rgba(65, 131, 196, 0.8); }
Compact:
body { background: #fff; font: 12px/2em Arial, Helvetica, sans-serif; } ol, ul, li { margin: 0; padding: 0; } a { color: rgba(65, 131, 196, 0.8); }
Compact (No Spaces):
body{background:#fff;font:12px/2em Arial,Helvetica,sans-serif;} ol,ul,li{margin:0;padding:0;} a{color:rgba(65,131,196,0.8);}
Compact (Break Selectors):
body { background: #fff; font: 12px/2em Arial, Helvetica, sans-serif; } ol, ul, li { margin: 0; padding: 0; } a { color: rgba(65, 131, 196, 0.8); }
Compact (Break Selectors, No Spaces):
body{background:#fff;font:12px/2em Arial,Helvetica,sans-serif;} ol, ul, li{margin:0;padding:0;} a{color:rgba(65,131,196,0.8);}
Compressed:
body{background:#fff;font:12px/2em Arial,Helvetica,sans-serif}ol,ul,li{margin:0;padding:0}a{color:rgba(65,131,196,0.8)}
Installation
OPTION 1 - with Package Control (recommended)
The easiest way to install this package is through Package Control.
Install Package Control, follow instructions on the website.
Open command panel:
Ctrl+Shift+P(Linux/Windows) orCmd+Shift+P(OS X) and select Package Control: Install Package.When packages list appears, type
CSS Formatand select it.
OPTION 2 - with Git
Clone the repository in your Sublime Text “Packages” directory:
git clone git://github.com/mutian/Sublime-CSS-Format.git "CSS Format"
You can find your “Packages” inside the following directories:
OS X:
~/Library/Application Support/Sublime Text 2/Packages/Windows:
%APPDATA%/Sublime Text 2/Packages/Linux:
~/.Sublime Text 2/Packages/
OPTION 3 - without Git
Download the latest source zip from Github and extract it into a new folder named CSS Format in your Sublime Text “Packages” folder.
Usage
Select the code, or place cursor in the document, and execute commands in one of the following ways:
Context Menu: CSS Format.
Edit Menu: Edit > CSS Format.
Command Panel: Open command panel:
Ctrl+Shift+P(Linux/Windows) orCmd+Shift+P(OS X) and select Format CSS: XXX.
Shortcuts
By default, CSS Format provides no keyboard shortcuts to avoid conflicts, but you can read the included Example.sublime-keymaps file to get an idea how to set up your own.
Configuration
There are a number of configuration options available to customize the behavior on save. For the latest information on what options are available, select the menu item Preferences > Package Settings > CSS Format > Settings - Default.
DO NOT edit the default settings. Your changes will be lost when CSS Format is updated. ALWAYS edit the user settings by selecting Preferences > Package Settings > CSS Format > Settings - User.
indentation: Format indentation, you can set it to
" ". By default, this is set to"\t"expand_block_break: Set the line breaks after each rules block under
Expandedformat. By default, this is set to"\n\n".format_on_save: Set to
trueto trigger format on save. By default, this is set tofalse.format_on_save_action: Format action. You can refer to Settings - Default. By default, this is set to
"expand".format_on_save_filter: CSS Format matches the name of the file being saved against this regular expression to determine if a build should be triggered. By default, the setting has a value of
"\\.(css|sass|scss|less)$".
Author
Created by Mutian (http://mutian.wang).
For more info, you can send email to me: mutian(a)me.com!
Acknowledgements
For Chinese information, please visit http://mutian.wang/1508.