MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / toStyleVariable

Function toStyleVariable

examples/js/theme/theme.js:1–3  ·  view source on GitHub ↗
(variable)

Source from the content-addressed store, hash-verified

1function toStyleVariable(variable) {
2 return '--' + variable.replace(/[A-Z]/g, '-$&').toLowerCase();
3}
4
5var isBrowser = typeof window !== 'undefined';
6var isNativeSupport = isBrowser && window.CSS && window.CSS.supports && window.CSS.supports('(--a: 0)');

Callers 1

setRootStyleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected