Emmet: Support for SugarSS

Created on 9 Mar 2016  ·  5Comments  ·  Source: emmetio/emmet

This is PostCSS' new/official alternative to preprocessor syntaxes: https://github.com/postcss/sugarss

Most helpful comment

@corysimmons Did u use this plugin? https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS
I extracted this package and in file https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS/blob/master/Syntaxes/SugarSS.tmLanguage
I changed 414 line from source.css.postcss.sugarss to source.sss

I extracted Emmet package. Then modified some lines in file editor.js

on 382 line if statement going

else if (/\b(less|scss|sass|css|stylus|postcss)\b/.test(scope)) {
        // detect CSS-like syntaxes independently,
        // since it may cause collisions with some highlighters
        syntax = RegExp.$1;

        if (syntax === 'postcss') {
            syntax = 'css';
        } else if (syntax === 'sss') { // I added this 3 lines started from else
            syntax = 'sass'; // this
        } // and this

and now its expand m0 as margin: 0 (without semicolon).

but without this changes its expand margin: 0;

All 5 comments

Emmet puts semicolons on the end...

Are you using Stylus syntax or did Emmet officially start supporting this?

@corysimmons Did u use this plugin? https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS
I extracted this package and in file https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS/blob/master/Syntaxes/SugarSS.tmLanguage
I changed 414 line from source.css.postcss.sugarss to source.sss

I extracted Emmet package. Then modified some lines in file editor.js

on 382 line if statement going

else if (/\b(less|scss|sass|css|stylus|postcss)\b/.test(scope)) {
        // detect CSS-like syntaxes independently,
        // since it may cause collisions with some highlighters
        syntax = RegExp.$1;

        if (syntax === 'postcss') {
            syntax = 'css';
        } else if (syntax === 'sss') { // I added this 3 lines started from else
            syntax = 'sass'; // this
        } // and this

and now its expand m0 as margin: 0 (without semicolon).

but without this changes its expand margin: 0;

Thanks for workaround

Available in v2

Was this page helpful?
0 / 5 - 0 ratings