Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides support for user-defined functions, importers and headers.
- type SassFunctionType = SassValue -> IO SassValue
- data SassFunction = SassFunction {}
- data SassImport = SassImport {}
- type SassImporterType = String -> IO [SassImport]
- data SassImporter = SassImporter {}
- makeSourceImport :: String -> SassImport
- makePathImport :: String -> String -> SassImport
Functions
type SassFunctionType Source
Type of the function that may be used in sass source.
data SassFunction Source
Description of the function that may be used in sass source.
SassFunction | |
|
Imports and headers
data SassImport Source
Represents a sass import - a sass content with additional metadata.
Even though this ADT has four fields, you may just provide either
importPath
and importBase
and leave loading to the library, or provide
importSource
and do not provide importPath
nor importBase
.
Nevertheless, you are free to provide all of the fields.
SassImport | |
|
type SassImporterType Source
= String | Path to the import that needs to be loaded or file that is being processed when used as a header. |
-> IO [SassImport] | Imports. |
Type of the function that acts like importer/header.
You may return empty list in order to tell libsass to handle the import by itself or not insert any header.
data SassImporter Source
Description of the importer.
SassImporter | |
|
makeSourceImport :: String -> SassImport Source
makeSourceImport
s
is equivalent to SassImport
Nothing Nothing (Just s) Nothing
.
makePathImport :: String -> String -> SassImport Source
makePathImport
p b
is equivalent to SassImport
(Just p) (Just b) Nothing Nothing
.