stylis
stylis copied to clipboard
Fix: #292
Fixes #292
Use djb2
to hash the entire css property. A test case using known-css-properties
has been added to make sure there is no collision.
The bundle size before the change:
index.js → dist/umd/stylis.js...
stylis.js ⏤ 4.11 kB
created dist/umd/stylis.js in 385ms
index.js → dist/stylis.mjs...
stylis.mjs ⏤ 3.97 kB
The bundle size after the change:
index.js → dist/umd/stylis.js...
stylis.js ⏤ 4.54 kB
created dist/umd/stylis.js in 378ms
index.js → dist/stylis.mjs...
stylis.mjs ⏤ 4.41 kB
created dist/stylis.mjs in 388ms
It is 500 bytes larger (after gzip).
Mark the PR as a draft for further discussion.
Potential optimization: use toString(36)
or a self-implemented toString(62)
?
Pull Request Test Coverage Report for Build 424ce9bebb747f859fd8378478ef4e3a59762144-PR-293
- 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.02%) to 98.856%
Totals | |
---|---|
Change from base Build a2fdca83a2377230a66f8d9c5d477bc87c10c188: | 0.02% |
Covered Lines: | 273 |
Relevant Lines: | 275 |