Hi Team,
Testing 5.1 RC1
Step 1. In either Custom CSS either in Pro or child theme add the following :root { --my-css-color: #f00;}
Step 2. Following Feature Requests: Dynamic Content Provider like a shortcode
add_filter('cs_dynamic_content_custom', function ($result, $field, $args = array()) {
$result = 'var(--' . $field . ')';
return $result;
}, 10, 3);
Step 3. Add a Dropdown, Modal or Off Canvas Element > Setup and set any Color Picker like Background Color or Box Shadow to Dynamic Content value {{dc:custom:my-css-color}}
. NOTE, setting this Dynamic Content value in the Toggles for Dropdown, Modal or Off Canvas Element will work.
Step 4. In the frontend, inspect the Dropdown, Modal or Off Canvas content area you will notice the HTML markup for the id attribute has inline CSS variables generated, something like id="--tco-dc2-0:var(--my-css-color);"
.
This should really be set for the inline style attribute of the content area of the Dropdown, Modal or Off Canvas Element. For example style="background-color: var(--my-css-color);"