Fixes case of some icons

This commit is contained in:
Javier Arce 2016-01-22 18:39:44 +01:00
parent b45b7c10a4
commit f92109cbdb
6 changed files with 24 additions and 12 deletions

View File

@ -2,9 +2,21 @@ var gulp = require('gulp');
var iconfont = require('gulp-iconfont'); var iconfont = require('gulp-iconfont');
var iconfontCss = require('gulp-iconfont-css'); var iconfontCss = require('gulp-iconfont-css');
String.prototype.toTitleCase = function() {
return this.replace(/\w\S*/g, function(txt){ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });
};
String.prototype.toCamelCase = function() { String.prototype.toCamelCase = function() {
var str = this.replace('--', ''); var str = this.split('--');
return str.replace(/^([A-Z])|\s(\w)/g, function(match, p1, p2, offset) { var result;
if (str && str.length > 1) {
result = str[0] + str[1].toTitleCase();
} else {
result = this;
}
return result.replace(/^([A-Z])|\s(\w)/g, function(match, p1, p2, offset) {
if (p2) return p2.toUpperCase(); if (p2) return p2.toUpperCase();
return p1.toLowerCase(); return p1.toLowerCase();
}); });

View File

@ -1,7 +1,7 @@
{ {
"name": "cartoassets", "name": "cartoassets",
"description": "Share frontend assets between different CartoDB repositories", "description": "Share frontend assets between different CartoDB repositories",
"version": "0.1.19", "version": "0.1.20",
"homepage": "https://github.com/cartodb/CartoAssets", "homepage": "https://github.com/cartodb/CartoAssets",
"author": { "author": {
"name": "CartoDB", "name": "CartoDB",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -54,14 +54,14 @@ All available icons in CartoDB.
<div class="box"> <div class="box">
<i class="CDB-IconFont CDB-IconFont--heartempty Size-large"></i> <i class="CDB-IconFont CDB-IconFont--heartEmpty Size-large"></i>
<h4 class="Text Size-small">heartempty</h4> <h4 class="Text Size-small">heartEmpty</h4>
</div> </div>
<div class="box"> <div class="box">
<i class="CDB-IconFont CDB-IconFont--heartfill Size-large"></i> <i class="CDB-IconFont CDB-IconFont--heartFill Size-large"></i>
<h4 class="Text Size-small">heartfill</h4> <h4 class="Text Size-small">heartFill</h4>
</div> </div>
@ -234,8 +234,8 @@ All available icons in CartoDB.
<div class="box"> <div class="box">
<i class="CDB-IconFont CDB-IconFont--unlockwithEllipsis Size-large"></i> <i class="CDB-IconFont CDB-IconFont--unlockWithellipsis Size-large"></i>
<h4 class="Text Size-small">unlockwithEllipsis</h4> <h4 class="Text Size-small">unlockWithellipsis</h4>
</div> </div>
@ -631,12 +631,12 @@ All available icons in CartoDB.
} }
.CDB-IconFont--heartempty::before { .CDB-IconFont--heartEmpty::before {
content: '\E003'; content: '\E003';
} }
.CDB-IconFont--heartfill::before { .CDB-IconFont--heartFill::before {
content: '\E004'; content: '\E004';
} }
@ -781,7 +781,7 @@ All available icons in CartoDB.
} }
.CDB-IconFont--unlockwithEllipsis::before { .CDB-IconFont--unlockWithellipsis::before {
content: '\E021'; content: '\E021';
} }