A WordPress plugin for Bricks Builder that auto-expands CSS variables in input fields and code editor. This plugin only works with Bricks Builder.
- Upload the plugin as usual.
- Activate the plugin through the Plugins screen (Plugins > Installed Plugins).
- Go to Settings > CSS Var Expander to enable the functionality (only works when the Bricks theme is active).
-
CSS Variable Expansion:
- When you type a CSS variable shorthand like
--fooin a Bricks panel input field or the custom CSS code editor, the plugin automatically converts it tovar(--foo). - This works when you press the
Enterkey or the;(semicolon) key in text input fields within the Bricks panel. - In the custom CSS code editor, it expands the variable before inserting a semicolon when you press
;.
- When you type a CSS variable shorthand like
-
Mathematical Expression Handling:
- The plugin detects mathematical expressions (e.g.,
100px + 50px,--foo * 2, or--foo / 3) and wraps them incalc()if they are not already wrapped. - For example, typing
--foo + --barbecomescalc(var(--foo) + var(--bar)), and100px * --foobecomescalc(100px * var(--foo)).
- The plugin detects mathematical expressions (e.g.,