Js-beautify: Directives to Ignore or Preserve sections for CSS

Created on 19 Nov 2015  ·  3Comments  ·  Source: beautify-web/js-beautify

This is a feature request to add directives to ignore or preserve sections in CSS as it is currently possible in JavaScript.

This came up as a request in the Brackets Beautify extension:
https://github.com/brackets-beautify/brackets-beautify/issues/187

css enhancement

Most helpful comment

:+1:

Example SCSS (Compass):

$primaryFont: "My font name";
@include font-face(
    $primaryFont,
    font-files(
        "my_font_name.ttf",
        "my_font_name.woff",
        "my_font_name.svg"
    ),
    "my_font_name.eot"
);

will be converted into:

$primaryFont: "My font name";
@include font-face( $primaryFont, font-files( "my_font_name.ttf", "my_font_name.woff", "my_font_name.svg" ), "my_font_name.eot" );

Using /* beautify ignore:start */ should be possible.

All 3 comments

Probably not to difficult to port the code from #384 for the ignore that also skips parsing. The css beautifier doesn't parse.

:+1:

Example SCSS (Compass):

$primaryFont: "My font name";
@include font-face(
    $primaryFont,
    font-files(
        "my_font_name.ttf",
        "my_font_name.woff",
        "my_font_name.svg"
    ),
    "my_font_name.eot"
);

will be converted into:

$primaryFont: "My font name";
@include font-face( $primaryFont, font-files( "my_font_name.ttf", "my_font_name.woff", "my_font_name.svg" ), "my_font_name.eot" );

Using /* beautify ignore:start */ should be possible.

@Hirse
ignore is supported in v1.9.0-beta1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keeganstreet picture keeganstreet  ·  6Comments

mubaidr picture mubaidr  ·  6Comments

buinauskas picture buinauskas  ·  5Comments

CaitlinWeb picture CaitlinWeb  ·  3Comments

Hirse picture Hirse  ·  3Comments