Closed gadenbuie closed 10 months ago
Fixes #397
In the CSS spec, custom properties have to start with -- and thereafter any character is allowed and is used literally: https://www.w3.org/TR/css-variables-1/#defining-variables
--
This PR updates css() to avoid making any changes to CSS properties in any way, while still conveniently converting camelCase, snake_case and dot.case properties (those that don't start with --) to kebab-case.
css()
css( font_size = "12px", "--_color" = "red", "--is_color" = "true", "--thisValueIs" = 42 ) #> [1] "font-size:12px;--_color:red;--is_color:true;--thisValueIs:42;"
Fixes #397
In the CSS spec, custom properties have to start with
--
and thereafter any character is allowed and is used literally: https://www.w3.org/TR/css-variables-1/#defining-variablesThis PR updates
css()
to avoid making any changes to CSS properties in any way, while still conveniently converting camelCase, snake_case and dot.case properties (those that don't start with--
) to kebab-case.