Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.28 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.28 KB

PostCSS Camelcaser Build Status

PostCSS plugin which camelcases all your selectors.

Camelcaser transforms all your selectors to camel case, by default choosing to force the output to lowerCamelCase.

.camel-case-me {
    /* Some stuff */
}
.camelCaseMe {
  /* Same stuff */
}

options

forceCaseStyle

type: ('lowerCamelCase' | 'UpperCamelCase' | 'off')

default: lowerCamelCase

Will force the camel case transformation to a specific camel case style.

The default style option, lowerCamelCase, will ensure that all transformation will have the lower camel case style:

  • Camel-case_me => camelCaseMe

The UpperCamelCase style option will ensure that all transformations will have the upper camel case style:

  • camel-case_me => CamelCaseMe

Using the off style option will maintain the case of the leading letter:

  • Camel-case_me => CamelCaseMe
  • camel-case_me => camelCaseMe

Usage

postcss([ require('postcss-camelcaser')(/* options */{}), ])

See PostCSS docs for examples for your environment.