Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@theme-ui/css

Package Overview
Dependencies
Maintainers
4
Versions
432
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theme-ui/css - npm Package Compare versions

Comparing version 0.7.0--canary.1423.3d0dfed.0 to 0.7.0

CHANGELOG.md

2

dist/theme-ui-css.cjs.dev.js

@@ -370,3 +370,3 @@ 'use strict';

var mediaQueries = [null].concat(_toConsumableArray(breakpoints.map(function (n) {
return "@media screen and (min-width: ".concat(n, ")");
return n.includes('@media') ? n : "@media screen and (min-width: ".concat(n, ")");
})));

@@ -373,0 +373,0 @@

@@ -370,3 +370,3 @@ 'use strict';

var mediaQueries = [null].concat(_toConsumableArray(breakpoints.map(function (n) {
return "@media screen and (min-width: ".concat(n, ")");
return n.includes('@media') ? n : "@media screen and (min-width: ".concat(n, ")");
})));

@@ -373,0 +373,0 @@

@@ -366,3 +366,3 @@ function _arrayLikeToArray(arr, len) {

var mediaQueries = [null].concat(_toConsumableArray(breakpoints.map(function (n) {
return "@media screen and (min-width: ".concat(n, ")");
return n.includes('@media') ? n : "@media screen and (min-width: ".concat(n, ")");
})));

@@ -369,0 +369,0 @@

{
"name": "@theme-ui/css",
"version": "0.7.0--canary.1423.3d0dfed.0",
"version": "0.7.0",
"source": "src/index.ts",

@@ -18,3 +18,3 @@ "main": "dist/theme-ui-css.cjs.js",

},
"gitHead": "3d0dfedb597bd968ea8e76b291ec8e8cfed98bef"
"gitHead": "77b7a46da4fe2dfe3c1065a7ef22fe06e31415a4"
}

@@ -293,3 +293,5 @@ import {

null,
...breakpoints.map((n) => `@media screen and (min-width: ${n})`),
...breakpoints.map((n) =>
n.includes('@media') ? n : `@media screen and (min-width: ${n})`
),
]

@@ -296,0 +298,0 @@

@@ -663,2 +663,34 @@ import { css, NestedScale, NestedScaleDict, Theme, ThemeUIExtendedCSSProperties } from '../src'

test('returns custom media queries', () => {
const result = css({
fontSize: [2, 3, 4],
color: 'primary',
})({
theme: {
...theme,
breakpoints: [
'32em',
'@media screen and (orientation: landscape) and (min-width: 40rem)',
],
},
})
const keys = Object.keys(result)
expect(keys).toEqual([
'fontSize',
'@media screen and (min-width: 32em)',
'@media screen and (orientation: landscape) and (min-width: 40rem)',
'color',
])
expect(result).toEqual({
fontSize: 16,
'@media screen and (min-width: 32em)': {
fontSize: 24,
},
'@media screen and (orientation: landscape) and (min-width: 40rem)': {
fontSize: 36,
},
color: 'tomato',
})
})
test('supports vendor properties', () => {

@@ -681,3 +713,2 @@ expect(css({ WebkitOverflowScrolling: 'touch' })(theme)).toStrictEqual({

test('borderTopWidth accepts number', () => {

@@ -684,0 +715,0 @@ expect(css({

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc