Skip to content

Commit fb91fc4

Browse files
committed
use a unique hash
1 parent 832fdec commit fb91fc4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ let insertRules = (realCSS) => {
9393

9494
let getHash = (string) => {
9595
/* Get random string */
96-
let hash = Math.random().toString(36).substring(22);
96+
let hash = Math.random().toString(36).substring(7);
9797
/* CSS classnames should begin with an alphabet */
9898
return 'c' + hash;
9999
}

css-constructor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var _extends = Object.assign || function (target) {
5656
d = (0, _stylis2.default)('.' + c, a);return b.innerHTML += d, c;
5757
},
5858
getHash = function getHash() {
59-
var b = Math.random().toString(36).substring(22);return 'c' + b;
59+
var a = Math.random().toString(36).substring(7);return 'c' + a;
6060
},
6161
getStyleElement = function getStyleElement() {
6262
var a = document.querySelector('[title=css-constructor]');return a || (a = document.createElement('style'), a.setAttribute('title', 'css-constructor'), document.head.appendChild(a)), a;

example/css-constructor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)