Table of contents
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
- since: 2002-08-03
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2002-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf
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’