Heads up! This blog post hasn't been updated in over 2 years. CodePen is an ever changing place, so if this post references features, you're probably better off checking the docs. Get in touch with support if you have further questions.

We use the js-beautify library for the Tidy button in the CodePen editors. In the past, we’ve only allowed it for raw HTML, CSS, and JavaScript. But now, through a combination of upgrades to that library over time and minor configuration changes, we now allow Tidy on SCSS and Less. They are both “CSS like” languages, but I’m afraid it won’t work on Sass. Sass is white-space dependant anyway, so it kinda encourages formatting as you write.

Also! If you’re using JSX syntax in your JavaScript (which we support through Babel as well as TypeScript), the Tidy button should handle that OK now as well.