System Token Types
Special Tokens
Elevate includes a number of “helper” token types that provide additional capabilities beyond the core functionality for specific situations. These can be used to extend the framework’s capabilities, but they should be used with caution.
Pass-Through Tokens
- Unrestricted value entry.
- No build-time validation, for dynamic or flexible values.
- Used for CSS rules that require special syntax (e.g., URLs or complex values such as transforms).
- Supports any value that can be passed through to a CSS declaration.
- Spaces are supported in the token value by using an underscore (_) to replace spaces.
Example:
rotate: { "rotate": "PassThroughToken" // Allows any rotation value}
<div class="rotate:((90deg))"></div>
Numeric Tokens
- For numeric values.
- Build-time validation ensures that the value is a valid number.
- Primarily used for CSS rules that require numeric values.
Example:
//Elevate's declaration map, responsible for matching modifiers to CSS declarations for a given property.// ============================= // Z-Index // ============================= z: { "z-index": "NumericToken" }
<div class="z:20"></div>