PHP Class Pressbooks\Sass

ファイルを表示 Open project: pressbooks/pressbooks

Public Properties

Property Type Description
$errorsEmail array Email addresses to send log errors.

Public Methods

Method 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

Protected Methods

Method Description
logException ( Exception $e ) Log Exceptions

Method Details

applyOverrides() public method

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.
return string

compile() public method

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

debug() public method

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

defaultIncludePaths() public method

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

getStringsToLocalize() public method

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

isCurrentThemeCompatible() public method

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

logException() protected method

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

parseVariables() public method

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

pathToDebugDir() public method

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

pathToFonts() public method

Get the path to our PB Fonts
public pathToFonts ( ) : string
return string

pathToGlobals() public method

Get the path to our PB Partials
public pathToGlobals ( ) : string
return string

pathToPartials() public method

Get the path to our PB Partials
public pathToPartials ( ) : string
return string

pathToUserGeneratedCss() public method

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

pathToUserGeneratedSass() public method

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

prependLocalizedVars() public method

Prepend localized version of content string variables.
public prependLocalizedVars ( string $scss ) : string
$scss string
return string

urlToUserGeneratedCss() public method

Get URI to user transpiled CSS files
public urlToUserGeneratedCss ( ) : string
return string

Property Details

$errorsEmail public_oe property

Email addresses to send log errors.
public array $errorsEmail
return array