Mojolicious::Plugin::Sass - Use Sass
in your Mojolicious templates
$app->plugin('Sass');
Mojolicious::Plugin::Sass is a simple plugin to use Sass (http://sass-lang.com/) in your Mojolicious app.
# Mojolicious
$app->plugin('sass');
# Mojolicious::Lite
plugin 'sass';
Called when registering the plugin.
Converts a Sass stylesheet to CSS on the fly.
Converts an Scss stylesheet to CSS on the fly.
Converts a Sass stylesheet to a compressed CSS on the fly.
This handler is EXPERIMENTAL and may change without warnings.
Converts an Scss stylesheet to a compressed CSS on the fly.
This handler is EXPERIMENTAL and may change without warnings.
# In a template
%= sass_stylesheet compress => 1, begin
p {
color: #000;
a {
color: red;
}
}
p {
font-size: 12pt;
}
% end
Renders Sass stylesheet code inline.
Optional parameters include compress => "1"|"0"
(the default is 0
) and type => "sass"|"scss"
(the default is scss
).
This helper is EXPERIMENTAL and may change without warnings.
Mojolicious, Text::Sass, CSS::Compressor.
The functionality of this plugin is similar to Mojolicious::Plugin::SassRenderer, but supports template caching, DATA
templates, stylesheet helpers, and compression.
As this plugin uses Text::Sass and CSS::Compressor, it has their limitations.
https://github.com/Akron/Mojolicious-Plugin-Sass
Copyright (C) 2012, Nils Diewald.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl.