View on GitHub

CSS Format

CSS / SASS / SCSS / LESS Formatter for Sublime Text

Download this project as a .zip file Download this project as a tar.gz file

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:

Installation

OPTION 1 - with Package Control (recommended)

The easiest way to install this package is through Package Control.

  1. Install Package Control, follow instructions on the website.

  2. Open command panel: Ctrl+Shift+P (Linux/Windows) or Cmd+Shift+P (OS X) and select Package Control: Install Package.

  3. When packages list appears, type CSS Format and 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:

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:

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.

Author

Created by Mutian (http://mutian.info).

For more info, you can send email to me: mutian(a)me.com!

Acknowledgements

For Chinese information, please visit http://mutian.info/tech/1508.