1. Nov 22nd, 2010

    css-annotate 2.0: live annotate your app

    You can now mount css-annotate in your Web app (Rails 3.x, Padrino, etc) to serve annotated versions of all CSS, SCSS and SASS files. For example, to mount all files from public/stylesheets under the path /stylesheets/annotated:

    mount CSS::Annotate.new=>"/stylesheets/annotated"

    With yout browser, you can now access the CSS file /stylesheets/screen.css and its annotated version from /stylesheets/annotated/screen.css.

    To mount files from a different path, pass it as the sole argument to CSS::Annotate. For example:

    mount CSS::Annotate.new("app/views/stylesheets")=>"/stylesheets/annotated"

    With your browser, you can now access the annotated SCSS file /stylesheets/annotated/screen.scss. Note that both filename and extension must match the file you want annotated.

    CSS is annotated on the fly, just refresh the browser when you change the source file.

    Your comment, here ⇓