|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
674 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | var pattern = /-(\w|$)/g;
|
|---|
| 4 |
|
|---|
| 5 | var callback = function callback(dashChar, char) {
|
|---|
| 6 | return char.toUpperCase();
|
|---|
| 7 | };
|
|---|
| 8 |
|
|---|
| 9 | var camelCaseCSS = function camelCaseCSS(property) {
|
|---|
| 10 | property = property.toLowerCase();
|
|---|
| 11 |
|
|---|
| 12 | // NOTE :: IE8's "styleFloat" is intentionally not supported
|
|---|
| 13 | if (property === "float") {
|
|---|
| 14 | return "cssFloat";
|
|---|
| 15 | }
|
|---|
| 16 | // Microsoft vendor-prefixes are uniquely cased
|
|---|
| 17 | else if (property.charCodeAt(0) === 45&& property.charCodeAt(1) === 109&& property.charCodeAt(2) === 115&& property.charCodeAt(3) === 45) {
|
|---|
| 18 | return property.substr(1).replace(pattern, callback);
|
|---|
| 19 | } else {
|
|---|
| 20 | return property.replace(pattern, callback);
|
|---|
| 21 | }
|
|---|
| 22 | };
|
|---|
| 23 |
|
|---|
| 24 | module.exports = camelCaseCSS;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.