Skip to content

eablokker/espresso-csscomb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

CSScomb plugin for Espresso 5

This is a plugin for MacRabbit's Espresso code editor with support for the CSScomb plugin.

This plugin is a fork of the original CSScomb plugin for Espresso v2.1+ by Ola Christensson. It has been updated to CSScomb version 4.3.0.

Requirements

Features

This Espresso plugin uses CSScomb, a coding style formatter for CSS. Its main feature is sorting properties in a specific order. But it can also be used to beautify your style sheet.

In addition to plain CSS, the plugin also supports SCSS, Sass and Less syntax. Espresso 5 now has native support for these languages.

Usage

Select Text > CSScomb > Comb CSS or choose from the Actions dropdown to beautify your style sheet and sort properties. If you don't want to affect the entire style sheet, you can make one or several text selections before performing the action.

It's also possible to only beautify the style sheet without affecting the sort order (and vice versa).

Custom configuration

This plugin uses a custom made configuration that mimics the way Espresso writes CSS. It also honors your Espresso settings regarding tabs and line endings. The properties sort order is using CSScomb's zen ordering style.

To use your own custom configuration, you'll need to create a config file named ".csscomb.json" in your project's root. If you want to use the same configuration for several projects, you can place the file in a parent folder. The plugin searches for a config file in parent folders up to your home folder.

Instructions for creating this config file can be found on csscomb.com.

Updates

This plugin is a wrapper for the npm module csscomb. That means that you can update the bundled csscomb package yourself if there is a new version available. The package is found in the folder ScriptLibraries in this plugin. I will try to keep this plugin updated myself.

Installation

  1. Download and extract the zip
  2. Double-click the CSScomb.espressoplugin file to install