CascadeContext

Tracks the global source position across all CSS sources (external stylesheets, embedded styles, inline styles) to keep the cascade order deterministic.

Namespace: Com\Tecnick\Pdf\CSS

File: CascadeContext.php line 38

Tracks the global source position across all CSS sources (external stylesheets, embedded styles, inline styles) to keep the cascade order deterministic.

A context shared between extractions gives the rules of the first source a lower source order than the rules of the next one at equal specificity.

Tags

Constants

INLINE_STYLE_SOURCE_ORDER

File: CascadeContext.php line 49

public mixed INLINE_STYLE_SOURCE_ORDER = 10000000

MAX_NORMAL_SOURCE_ORDER

File: CascadeContext.php line 44

public mixed MAX_NORMAL_SOURCE_ORDER = 9999999

MIN_IMPORTANT_SOURCE_ORDER

File: CascadeContext.php line 55

public mixed MIN_IMPORTANT_SOURCE_ORDER = 100000000

Methods

getCurrentSourceType()

File: CascadeContext.php line 120

public getCurrentSourceType() : string

Return values

string

getInlineStyleSourceOrder()

File: CascadeContext.php line 99

public static getInlineStyleSourceOrder() : int

Return values

int

getNextImportantSourceOrder()

File: CascadeContext.php line 89

public getNextImportantSourceOrder() : int

Return values

int —

Global source order for this rule

getNextNormalSourceOrder()

File: CascadeContext.php line 79

public getNextNormalSourceOrder() : int

Return values

int —

Global source order for this rule

getTotalRulesProcessed()

File: CascadeContext.php line 130

public getTotalRulesProcessed() : int

Return values

int

reset()

File: CascadeContext.php line 140

public reset() : void

setCurrentSourceType()

File: CascadeContext.php line 110

public setCurrentSourceType(string $type) : void

Parameters

  • $type : string: ’external’, ’embedded’, ‘inline’