Skip to content

marcusramberg/Mojolicious-Plugin-Sass

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Mojolicious::Plugin::Sass - Use Sass in your Mojolicious templates

SYNOPSIS

$app->plugin('Sass');

DESCRIPTION

Mojolicious::Plugin::Sass is a simple plugin to use Sass (http://sass-lang.com/) in your Mojolicious app.

METHODS

register

# Mojolicious
$app->plugin('sass');

# Mojolicious::Lite
plugin 'sass';

Called when registering the plugin.

HANDLER

sass

Converts a Sass stylesheet to CSS on the fly.

scss

Converts an Scss stylesheet to CSS on the fly.

sassc

Converts a Sass stylesheet to a compressed CSS on the fly.

This handler is EXPERIMENTAL and may change without warnings.

scssc

Converts an Scss stylesheet to a compressed CSS on the fly.

This handler is EXPERIMENTAL and may change without warnings.

HELPERS

sass_stylesheet

# 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.

DEPENDENCIES

Mojolicious, Text::Sass, CSS::Compressor.

SEE ALSO

The functionality of this plugin is similar to Mojolicious::Plugin::SassRenderer, but supports template caching, DATA templates, stylesheet helpers, and compression.

BUGS

As this plugin uses Text::Sass and CSS::Compressor, it has their limitations.

AVAILABILITY

https://github.com/Akron/Mojolicious-Plugin-Sass

COPYRIGHT AND LICENSE

Copyright (C) 2012, Nils Diewald.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl.

About

Use Sass in your Mojolicious templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 100.0%