SCSS

Creates CSS output and adds to Processor object from SCSS in other plugins

=begin rakudoc :type<plugin>

AUTHOR

Richard Hainsworth, aka finanalyst

VERSION

v0.1.0

Overview

Uses the Dart CASS program to convert SCSS input into CSS output that is added to the RPO structure.

The plugin has a SCSS to CSS converter that is intended to be run once and after any other plugin that defines a scss: field in its %.config attribute in the correct manner for HTML-Extra, eg.,

    %!config =
        :scss( [ self.add-scss-string, 2], ),

In order to accomplish this, the SCSS workspace has a closure to be called with the RakuDoc-Processor (rdp) object. A renderer, eg. RakuDoc::To::HTML-Extra, will call the closure after all plugins have been enabled, eg.

$rdp.template.data<SCSS><run-sass>.( $rdp )

After which $rdp.templates.data<css> will contain a string of all the CSS from each of the :scss fields concatenated in the correct order. Any existing value of :css provided by the renderer itself is assumed to have order 0.

Warnings

  • The scss attribute must be a sequence of Str,Int tuples, eg.,

    :scss( [ '/*! Test */.bolder { font-weight:450; } ', 1 ] , ),
    

    so the comma inside the last ) is important.

  • This plugin adds CSS to the Processor instance for each plugin. If a plugin has both a :css and a :scss attribute set in its config, SCSS will ignore the :css and render the :scss. If a plugin only has a :css and no :scss, the :css value will be concatenated with the order set or with an implied order of 0.

  • It is assumed that a shell call to sass -v will yield a version number, otherwise the plugin will die.

Note that a plugin can be disabled by overriding the default plugin list (see Customisability in HTML-Extra ).

=place semantic:AUTHOR :caption<Credits> =place semantic:VERSION :!toc =end rakudoc

Rakuast::RakuDoc::Render v1.0.14

Renders RakuDoc v2 to text, HTML, HTML-Extra, Markdown

Authors

  • Richard Hainsworth

License

Artistic-2.0

Dependencies

Test::Deeply::RelaxedPrettyDumpTest::OutputLibCurlURIDigest::SHA1::NativeText::MiscUtilsMethod::ProtectedTest::RunRakuAST::Deparse::HighlightRainbow:ver<0.3.0+>File::Directory::TreeJSON::FastYAMLishXML

Test Dependencies

Provides

  • RakuDoc::Citations
  • RakuDoc::MarkupMeta
  • RakuDoc::Numeration
  • RakuDoc::Plugin::HTML::Bulma
  • RakuDoc::Plugin::HTML::FontAwesome
  • RakuDoc::Plugin::HTML::Graphviz
  • RakuDoc::Plugin::HTML::Hilite
  • RakuDoc::Plugin::HTML::Latex
  • RakuDoc::Plugin::HTML::LeafletMaps
  • RakuDoc::Plugin::HTML::ListFiles
  • RakuDoc::Plugin::HTML::SCSS
  • RakuDoc::Plugin::Markdown::Graphviz
  • RakuDoc::Processed
  • RakuDoc::PromiseStrings
  • RakuDoc::Render
  • RakuDoc::ScopedData
  • RakuDoc::Templates
  • RakuDoc::To::Generic
  • RakuDoc::To::HTML
  • RakuDoc::To::HTML-Extra
  • RakuDoc::To::Markdown
  • RenderDocs

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.