Class CssVariableRegistry
- Namespace
- SharpVectors.Dom.Css
- Assembly
- SharpVectors.Css.dll
Manages CSS custom property definitions (CSS variables like --my-color: red;) and provides variable resolution with scope support.
public class CssVariableRegistry
- Inheritance
-
CssVariableRegistry
- Inherited Members
Constructors
Properties
- GlobalVariableCount
Gets count of defined variables
Methods
- Clear()
Clears all variables
- DefineGlobalVariable(string, string)
Defines a custom property (CSS variable) in the global scope
- DefineScopedVariable(string, string, string)
Defines a custom property in the current scope
- GetGlobalVariables()
Gets all defined variables in global scope
- GetScopedVariables(string)
Gets all defined variables in a specific scope
- HasVariable(string, string)
Checks if a variable is defined
- PopScope()
Exits the current scope
- PushScope(string)
Enters a new scope (e.g., when processing a CSS rule)
- ResolveVariable(string, string, string)
Resolves a variable reference with optional fallback value