Class: Brandish::Processors::HTML::Style
- Inherits:
-
Common::Asset
- Object
- Brandish::Processor::Base
- Common::Asset
- Brandish::Processors::HTML::Style
- Defined in:
- lib/brandish/processors/html/style.rb,
lib/brandish/processors/html/style/sass.rb,
lib/brandish/processors/html/style/vanilla.rb,
lib/brandish/processors/html/style/highlight.rb
Overview
A Style asset. This is a CSS asset.
Engines:
"highlight-rouge"
,"highlight-rouge-file"
- A command. Retrieves the given theme from the Rouge library, and outputs it to the"output"
pair (or"highlight/rouge/<theme>.css"
by default)."highlight-pygments",
"highlight-pygments-file"- A command. Retrieves the given theme from the Pygments library, and outputs it to the
"output"pair (or
"highlight/pygments/.css"` by default). "highlight-rouge-inline"
- A command. Retrieves the given theme from the Rouge library, and uses it like an inline style."highlight-pygments-inline"
- A command. Retrieves the given theme from the pygments library, and uses it like an inline style."sass"
,"sass-file"
,"scss"
,"scss-file"
- A command. These take a file and processes it, and outputs it to the output path given by#load_file_paths
. There is no difference between any of these engine types - the engine assumes the actual syntax of the file from the file extension."sass-inline"
- A block. This takes the block's contents, performs Brandish::Parser::Node::Root#flatten on it, and processes the content as Sass. This is then included as an inline stylesheet."scss-inline" - A block. Similar to
"sass-inline"`, except it processes the content as SCSS."file"
- A command. Takes a file, and copies it over to the destination, based on the values given in#load_file_paths
."remote"
,"remote-file"
- A command. Takes a URI (supportshttp
,https
, andftp
), and outputs the directory into the"output"
pair (or a uri path assumed from the URI)."inline"
- A block. This performs Brandish::Parser::Node::Root#flatten on the body, and pushes the result as an inline style."remote-inline"
- A command. Similar to"remote"
; however, this takes the remote styles as an inline style.
Pairs:
"src"
,"file"
,"name"
, or"link"
- Required. At least one of these options are required. They all perform the same function. This defines the name or path of the asset to add or process."type"
- Required. The type of the asset to process. This defines how the asset is handled."theme"
- Required (forhighlight-*
engines only). The theme to find for styling."scope"
- Required (forhighlight-*
engines only). The CSS scope for styling."output"
- Optional (forhighlight-*
engines or for"remote"
/"remote-file"
that output to a file only). The output path for the CSS file.
Defined Under Namespace
Modules: Highlight, Sass, Vanilla
Instance Attribute Summary
Attributes inherited from Brandish::Processor::Base
Instance Method Summary collapse
-
#asset_kind_extension ⇒ ::String
abstract
The extension for this kind of asset.
-
#asset_kind_path ⇒ ::String
abstract
The asset path for this kind of asset.
Methods inherited from Common::Asset
engine, engines, #load_asset_file, #perform
Methods included from Common::Asset::Paths
#asset_load_paths, #load_file_paths, #output_assets_path, #uri_path
Methods included from Brandish::Processor::Block
included, #perform, #process_block
Methods included from Brandish::Processor::Command
included, #perform, #process_command
Methods inherited from Brandish::Processor::Base
#accept, #call, #initialize, #postprocess, #process_block, #process_command, #process_root, #process_text, register, #setup
Constructor Details
This class inherits a constructor from Brandish::Processor::Base
Instance Method Details
#asset_kind_extension ⇒ ::String
This method is abstract.
The extension for this kind of asset. This defaults to no extension.
76 77 78 |
# File 'lib/brandish/processors/html/style.rb', line 76 def asset_kind_extension ".css" end |
#asset_kind_path ⇒ ::String
This method is abstract.
The asset path for this kind of asset.
71 72 73 |
# File 'lib/brandish/processors/html/style.rb', line 71 def asset_kind_path "assets/styles" end |