hsass-0.8.0: Integrating Sass into Haskell applications.

Text.Sass.Functions

Contents

Description

Provides support for user-defined functions, importers and headers.

Synopsis

# Functions

Arguments

 = SassValue Arguments of the function (SassList). -> IO SassValue Result of the computation.

Type of the function that may be used in sass source.

Description of the function that may be used in sass source.

Constructors

 SassFunction FieldsfuncSignature :: StringSignature of the function, parsable by libsass.funcComputation :: SassFunctionTypeMain function.

Even though this ADT has four fields, you may just provide either importPath and importAbsolutePath and leave loading to the library, or provide importSource and do not provide importAbsolutePath. Nevertheless, you are free to provide all of the fields.

Constructors

 SassImport FieldsimportPath :: Maybe FilePathPath to the import, as requested by the import statement.importAbsolutePath :: Maybe FilePathAbsolute path to the file.importSource :: Maybe StringImport's source.importSourceMap :: Maybe StringSource map of the import.

Arguments

 = String Path to the import that needs to be loaded. -> String Absolute path to the importing file. -> IO [SassImport] Imports.

Type of the function that acts like an importer.

You may return the empty list in order to tell libsass to handle the import by itself.

Description of the importer.

Constructors

 SassImporter FieldsimporterPriority :: DoublePriority of the importer.importerFunction :: SassImporterTypeMain function.

Arguments

 = String Absolute path to the file being processed. -> IO [SassImport] Imports.

Type of the function that acts like a header.

makeSourceImport s is equivalent to SassImport Nothing Nothing (Just s) Nothing.
makePathImport p is equivalent to SassImport (Just p) (Just p) Nothing Nothing.