rn-css 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cssToRN/index.js +3 -2
- package/package.json +1 -1
- package/src/cssToRN/index.ts +3 -2
package/dist/cssToRN/index.js
CHANGED
|
@@ -61,8 +61,9 @@ function cssToRNStyle(css, units = {}) {
|
|
|
61
61
|
exports.cssToRNStyle = cssToRNStyle;
|
|
62
62
|
function cssChunkToStyle(css) {
|
|
63
63
|
const result = {};
|
|
64
|
-
css.split(/\s*;\s
|
|
65
|
-
const [rawKey,
|
|
64
|
+
css.split(/\s*;\s*(?!base64)/mg).forEach((entry) => {
|
|
65
|
+
const [rawKey, ...rest] = entry.split(':');
|
|
66
|
+
const rawValue = rest.join(':');
|
|
66
67
|
if (!rawValue)
|
|
67
68
|
return;
|
|
68
69
|
const key = kebab2camel(rawKey.trim());
|
package/package.json
CHANGED
package/src/cssToRN/index.ts
CHANGED
|
@@ -59,8 +59,9 @@ export function cssToRNStyle (css: string, units: { em?: number, width?: number,
|
|
|
59
59
|
|
|
60
60
|
function cssChunkToStyle (css: string) {
|
|
61
61
|
const result: PartialStyle = {}
|
|
62
|
-
css.split(/\s*;\s
|
|
63
|
-
const [rawKey,
|
|
62
|
+
css.split(/\s*;\s*(?!base64)/mg).forEach((entry: string) => {
|
|
63
|
+
const [rawKey, ...rest] = entry.split(':')
|
|
64
|
+
const rawValue = rest.join(':')
|
|
64
65
|
if (!rawValue) return
|
|
65
66
|
const key = kebab2camel(rawKey.trim())
|
|
66
67
|
const value = stripSpaces(rawValue.trim())// We need this to correctly read calc() values
|