How to exclude css files from auto formatting in IntelliJ

Tags: css,intellij-idea,formatting,code-formatting

Problem :

We're using the auto formatting feature of IntelliJ to format our code whenever a commit to git is made.

The formatting works well for us except for our designer who's not happy with the way how IntelliJ formats his CSS files. Is there a way to deactivate auto formatting for certain file types?

Solution :

Since IDEA 13 it is possible to deactivate formatting with

/* @formatter:off */

and reactivate with

/* @formatter:on */

But you need to enable that first in Settings -> Code Style -> General -> Formatter Control

    CSS Howto..

    CSS: How to make custom file upload button take full width (button works)

    How to Troubleshoot CSS?

    How to give a property to an element using its title in css [duplicate]

    how to bind newly created html element to its css

    how to show text in a button with css

    How to emulate Google's thick, red underline text decoration

    How can I work around IE7 being unable to style dynamic elements created via DOM api

    How to make a div 100% of page (not screen) height?

    How to align banner right in Internet Explorer 8

    How to set the text absolutely (CSS) in the middle of a div despite a changing width div behind him?

    How implement google fonts when download the font in collection?

    How to load jQuery before CSS code?

    How to use conditional CSS In CakePHP 2.x?

    Sum of two divs widths is greater than parent width. How to make the browser resize the last div instead of moving it to the next line?

    How to format this form using only CSS

    How to style a