PHP Class Pressbooks\Sass

Afficher le fichier Open project: pressbooks/pressbooks

Méthodes publiques

Свойство Type Description
$errorsEmail array Email addresses to send log errors.

Méthodes publiques

Méthode Description
applyOverrides ( string $scss, string $overrides ) : string Prepend or append SCSS overrides depending on which version of the theme architecture is in use.
compile ( string $scss, array $includes = [] ) : string Returns the compiled CSS from SCSS input
debug ( string $css, $scss, string $filename ) Write CSS to a a debug dir
defaultIncludePaths ( string $type, $theme = null ) Get default include paths
getStringsToLocalize ( ) : array Fetch an array of strings in (S)CSS which need to be localized
isCurrentThemeCompatible ( integer $version = 1, $theme = null ) : boolean Are the current theme's stylesheets SCSS compatible?
parseVariables ( string $scss ) : array Parse an SCSS file into an array of variables.
pathToDebugDir ( ) : string Get path to a directory we can dump debug files into
pathToFonts ( ) : string Get the path to our PB Fonts
pathToGlobals ( ) : string Get the path to our PB Partials
pathToPartials ( ) : string Get the path to our PB Partials
pathToUserGeneratedCss ( ) : string Get path to a directory we can dump user transpiled CSS files into (create dir if it does not exist)
pathToUserGeneratedSass ( ) : string Get path to a directory we can dump user generated Sass files into (create dir if it does not exist)
prependLocalizedVars ( string $scss ) : string Prepend localized version of content string variables.
urlToUserGeneratedCss ( ) : string Get URI to user transpiled CSS files

Méthodes protégées

Méthode Description
logException ( Exception $e ) Log Exceptions

Method Details

applyOverrides() public méthode

Prepend or append SCSS overrides depending on which version of the theme architecture is in use.
public applyOverrides ( string $scss, string $overrides ) : string
$scss string The theme SCSS.
$overrides string The SCSS overrides.
Résultat string

compile() public méthode

Returns the compiled CSS from SCSS input
public compile ( string $scss, array $includes = [] ) : string
$scss string
$includes array (optional)
Résultat string

debug() public méthode

Write CSS to a a debug dir
public debug ( string $css, $scss, string $filename )
$css string
$filename string

defaultIncludePaths() public méthode

Get default include paths
public defaultIncludePaths ( string $type, $theme = null )
$type string

getStringsToLocalize() public méthode

Fetch an array of strings in (S)CSS which need to be localized
public getStringsToLocalize ( ) : array
Résultat array

isCurrentThemeCompatible() public méthode

Are the current theme's stylesheets SCSS compatible?
public isCurrentThemeCompatible ( integer $version = 1, $theme = null ) : boolean
$version integer
Résultat boolean

logException() protected méthode

Log Exceptions
protected logException ( Exception $e )
$e Exception

parseVariables() public méthode

Parse an SCSS file into an array of variables.
public parseVariables ( string $scss ) : array
$scss string
Résultat array

pathToDebugDir() public méthode

Get path to a directory we can dump debug files into
public pathToDebugDir ( ) : string
Résultat string

pathToFonts() public méthode

Get the path to our PB Fonts
public pathToFonts ( ) : string
Résultat string

pathToGlobals() public méthode

Get the path to our PB Partials
public pathToGlobals ( ) : string
Résultat string

pathToPartials() public méthode

Get the path to our PB Partials
public pathToPartials ( ) : string
Résultat string

pathToUserGeneratedCss() public méthode

Get path to a directory we can dump user transpiled CSS files into (create dir if it does not exist)
public pathToUserGeneratedCss ( ) : string
Résultat string

pathToUserGeneratedSass() public méthode

Get path to a directory we can dump user generated Sass files into (create dir if it does not exist)
public pathToUserGeneratedSass ( ) : string
Résultat string

prependLocalizedVars() public méthode

Prepend localized version of content string variables.
public prependLocalizedVars ( string $scss ) : string
$scss string
Résultat string

urlToUserGeneratedCss() public méthode

Get URI to user transpiled CSS files
public urlToUserGeneratedCss ( ) : string
Résultat string

Property Details

$errorsEmail public_oe property

Email addresses to send log errors.
public array $errorsEmail
Résultat array