Search code examples
csspluginsformattingnotepad++indentation

How to format and indent CSS in Notepad++?


I have CSS file generated by Sass compiler, but the text inside the CSS file is all on one line.

Is there a way to indent and or format it properly on Notepad++ and VSCode?

enter image description here

I have tried installing the XML Tools plugin, and then pressing the Pretty print, but nothing happens.


Solution

  • To format CSS in Notepad++:

    • Go to Plugins > Plugin Manager > Show Plugin Manager.
    • Select the JSTool Plugin and click Install
    • Go to Plugins > JSTool > JSFormat OR use keyboard shortcut Ctrl + Alt + M

    enter image description here

    is resulting in:

    enter image description here