O'Reilly logo

Play Framework Cookbook by Alexander Reelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Preprocessing content by integrating stylus

If you have taken a look at the available modules on the Play framework site, there are at the time of this writing two modules, which help the developer to write CSS. On one the hand is the SASS module and on the other hand the less module.

Both modules address the same problem: On every change of the source file, either SASS or less follows some recompilation into the destination CSS file. Only the most up to date CSS file may be delivered to the client. In development mode every incoming request should always create the most up to date CSS output, where as in production it is sufficient to create those files seldom and cache them in order to increase performance.

The source code of the example is available ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required