Hyphenates camel-cased string.
Applicable to CSS property names.
Converts:
backgroundColor to background-color.
backgroundColor
background-color
Uppercase letters converted to lower case and prepended by hyphen,
MozTransition to -moz-transition.
MozTransition
-moz-transition
The very first uppercase letter is prepended by hyphen too.
MSTransition to -ms-transition.
MSTransition
-ms-transition
Subsequent upper-case letters converted to lower case. The first and the last ones prepended by hyphen.
someURL to some-url
someURL
some-url
Subsequent upper-case letters in the very end of the string converted to lower case and prepended by hyphen.
color to color.
color
All lower-case names remain as is.
padding-left to padding-left
padding-left
The leading upper-case letter is not prepended by hyphen. Thus, e.g. MozTransition would be converted to moz-transition rather to -moz-transition.
moz-transition
Camel-cased input to hyphenate.
Hyphenated name.
Generated using TypeDoc
Hyphenates camel-cased string.
Applicable to CSS property names.
Converts:
backgroundColor
tobackground-color
.Uppercase letters converted to lower case and prepended by hyphen,
MozTransition
to-moz-transition
.The very first uppercase letter is prepended by hyphen too.
MSTransition
to-ms-transition
.Subsequent upper-case letters converted to lower case. The first and the last ones prepended by hyphen.
someURL
tosome-url
Subsequent upper-case letters in the very end of the string converted to lower case and prepended by hyphen.
color
tocolor
.All lower-case names remain as is.
padding-left
topadding-left
The leading upper-case letter is not prepended by hyphen. Thus, e.g.
MozTransition
would be converted tomoz-transition
rather to-moz-transition
.