Skip to content

Instantly share code, notes, and snippets.

View crabb's full-sized avatar

crabb crabb

  • GuangZhou,Cantoness,China
View GitHub Profile
import sublime
import sublime_plugin
import re
class CompactExpandCssCommand(sublime_plugin.TextCommand):
def run(self, edit, action='compact'):
rule_starts = self.view.find_all('\{')
rule_ends = self.view.find_all('\}')
function getStyle(obj, attr, value)
{
if(arguments.length == 2)
{
if(obj.currentStyle)
{
return obj.currentStyle[attr];
}
else
{