You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
870 B

2 years ago
  1. # camelcase-css [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
  2. > Convert a kebab-cased CSS property into a camelCased DOM property.
  3. ## Installation
  4. [Node.js](http://nodejs.org/) `>= 6` is required. Type this at the command line:
  5. ```shell
  6. npm install camelcase-css
  7. ```
  8. ## Usage
  9. ```js
  10. const camelCaseCSS = require('camelcase-css');
  11. camelCaseCSS('-webkit-border-radius'); //-> WebkitBorderRadius
  12. camelCaseCSS('-moz-border-radius'); //-> MozBorderRadius
  13. camelCaseCSS('-ms-border-radius'); //-> msBorderRadius
  14. camelCaseCSS('border-radius'); //-> borderRadius
  15. ```
  16. [npm-image]: https://img.shields.io/npm/v/camelcase-css.svg
  17. [npm-url]: https://npmjs.org/package/camelcase-css
  18. [travis-image]: https://img.shields.io/travis/stevenvachon/camelcase-css.svg
  19. [travis-url]: https://travis-ci.org/stevenvachon/camelcase-css