Socket
Socket
Sign inDemoInstall

@styled-system/css

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@styled-system/css - npm Package Compare versions

Comparing version 5.0.9 to 5.0.10

LICENSE.md

28

dist/index.esm.js

@@ -5,8 +5,4 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

export var get = function get(obj, key, def, p, undef) {
if (key === void 0) {
key = '';
}
key = key && key.split ? key.split('.') : [key];
key = key.split ? key.split('.') : [key];
for (p = 0; p < key.length; p++) {

@@ -66,2 +62,6 @@ obj = obj ? obj[key[p]] : undef;

paddingY: 'space',
top: 'space',
right: 'space',
bottom: 'space',
left: 'space',
fontFamily: 'fonts',

@@ -95,3 +95,3 @@ fontSize: 'fontSizes',

var getMargin = function getMargin(scale, value) {
var positiveOrNegative = function positiveOrNegative(scale, value) {
if (typeof value !== 'number' || value >= 0) {

@@ -107,11 +107,7 @@ return get(scale, value, value);

var transforms = {
margin: getMargin,
marginTop: getMargin,
marginRight: getMargin,
marginBottom: getMargin,
marginLeft: getMargin,
marginX: getMargin,
marginY: getMargin
};
var transforms = ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'top', 'bottom', 'left', 'right'].reduce(function (acc, curr) {
var _extends2;
return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
}, {});
export var responsive = function responsive(styles) {

@@ -127,2 +123,3 @@ return function (theme) {

var value = styles[key];
if (value == null) continue;

@@ -136,2 +133,3 @@ if (!Array.isArray(value)) {

var media = mediaQueries[i];
if (value[i] == null) continue;

@@ -138,0 +136,0 @@ if (!media) {

@@ -10,8 +10,4 @@ "use strict";

var get = function get(obj, key, def, p, undef) {
if (key === void 0) {
key = '';
}
key = key && key.split ? key.split('.') : [key];
key = key.split ? key.split('.') : [key];
for (p = 0; p < key.length; p++) {

@@ -73,2 +69,6 @@ obj = obj ? obj[key[p]] : undef;

paddingY: 'space',
top: 'space',
right: 'space',
bottom: 'space',
left: 'space',
fontFamily: 'fonts',

@@ -102,3 +102,3 @@ fontSize: 'fontSizes',

var getMargin = function getMargin(scale, value) {
var positiveOrNegative = function positiveOrNegative(scale, value) {
if (typeof value !== 'number' || value >= 0) {

@@ -114,12 +114,8 @@ return get(scale, value, value);

var transforms = {
margin: getMargin,
marginTop: getMargin,
marginRight: getMargin,
marginBottom: getMargin,
marginLeft: getMargin,
marginX: getMargin,
marginY: getMargin
};
var transforms = ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'top', 'bottom', 'left', 'right'].reduce(function (acc, curr) {
var _extends2;
return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
}, {});
var responsive = function responsive(styles) {

@@ -135,2 +131,3 @@ return function (theme) {

var value = styles[key];
if (value == null) continue;

@@ -144,2 +141,3 @@ if (!Array.isArray(value)) {

var media = mediaQueries[i];
if (value[i] == null) continue;

@@ -146,0 +144,0 @@ if (!media) {

{
"name": "@styled-system/css",
"version": "5.0.9",
"version": "5.0.10",
"description": "Styled System for the `css` prop",

@@ -18,3 +18,3 @@ "main": "dist/index.js",

"license": "MIT",
"gitHead": "a6feb6009c58f2eb68f0c3120c5672f6cb54294f",
"gitHead": "19b815b2e93f0bea28124299250e3e514f402e4e",
"publishConfig": {

@@ -21,0 +21,0 @@ "access": "public"

@@ -71,2 +71,6 @@

`paddingY`, `py` | `space`
`top` | `space`
`bottom` | `space`
`left` | `space`
`right` | `space`
`border` | `borders`

@@ -73,0 +77,0 @@ `borderTop` | `borders`

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