@theme-ui/css
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -148,7 +148,2 @@ var get = function (obj, key, def, p, undef) { | ||
if (value[i] == null) { | ||
next[media] = {}; | ||
continue; | ||
} | ||
if (!media) { | ||
@@ -160,2 +155,3 @@ next[key] = value[i]; | ||
next[media] = next[media] || {}; | ||
if (value[i] == null) { continue; } | ||
next[media][key] = value[i]; | ||
@@ -162,0 +158,0 @@ } |
@@ -148,7 +148,2 @@ var get = function (obj, key, def, p, undef) { | ||
if (value[i] == null) { | ||
next[media] = {}; | ||
continue; | ||
} | ||
if (!media) { | ||
@@ -160,2 +155,3 @@ next[key] = value[i]; | ||
next[media] = next[media] || {}; | ||
if (value[i] == null) { continue; } | ||
next[media][key] = value[i]; | ||
@@ -162,0 +158,0 @@ } |
@@ -153,7 +153,2 @@ (function (global, factory) { | ||
if (value[i] == null) { | ||
next[media] = {}; | ||
continue; | ||
} | ||
if (!media) { | ||
@@ -165,2 +160,3 @@ next[key] = value[i]; | ||
next[media] = next[media] || {}; | ||
if (value[i] == null) { continue; } | ||
next[media][key] = value[i]; | ||
@@ -167,0 +163,0 @@ } |
{ | ||
"name": "@theme-ui/css", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"main": "dist/index.js", | ||
@@ -16,3 +16,3 @@ "module": "dist/index.esm.js", | ||
}, | ||
"gitHead": "7663897ec671e1ff66b0d4ef946611dd57f3bb99" | ||
"gitHead": "f6380fc356ce97e64bf50ba60e0bc6f38a25dabe" | ||
} |
@@ -165,6 +165,2 @@ export const get = (obj, key, def, p, undef) => { | ||
const media = mediaQueries[i] | ||
if (value[i] == null) { | ||
next[media] = {} | ||
continue | ||
} | ||
if (!media) { | ||
@@ -175,2 +171,3 @@ next[key] = value[i] | ||
next[media] = next[media] || {} | ||
if (value[i] == null) continue | ||
next[media][key] = value[i] | ||
@@ -177,0 +174,0 @@ } |
@@ -435,1 +435,25 @@ import { css } from '../src' | ||
}) | ||
test('returns correct media query order 2', () => { | ||
const result = css({ | ||
flexDirection: 'column', | ||
justifyContent: [null, 'flex-start', 'flex-end'], | ||
color: 'background', | ||
height: '100%', | ||
px: [2, 3, 4], | ||
py: 4, | ||
})(theme) | ||
const keys = Object.keys(result) | ||
expect(keys).toEqual([ | ||
'flexDirection', | ||
'justifyContent', | ||
'@media screen and (min-width: 40em)', | ||
'@media screen and (min-width: 52em)', | ||
'color', | ||
'height', | ||
'paddingLeft', | ||
'paddingRight', | ||
'paddingTop', | ||
'paddingBottom', | ||
]) | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70981
1192