Socket
Socket
Sign inDemoInstall

@styled-system/position

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@styled-system/position - npm Package Compare versions

Comparing version 5.0.12 to 5.0.14

4

package.json
{
"name": "@styled-system/position",
"version": "5.0.12",
"version": "5.0.14",
"main": "dist/index.js",

@@ -14,3 +14,3 @@ "module": "dist/index.esm.js",

},
"gitHead": "64f48fd0586230324d1a3943dc56257699a8b9ef"
"gitHead": "0a42765abf8d3183aa7b79b527118db86788eb90"
}
import { system } from '@styled-system/core'
const defaults = {
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
}
const config = {

@@ -9,6 +13,22 @@ position: true,

},
top: true,
right: true,
bottom: true,
left: true,
top: {
property: 'top',
scale: 'space',
defaultScale: defaults.space,
},
right: {
property: 'right',
scale: 'space',
defaultScale: defaults.space,
},
bottom: {
property: 'bottom',
scale: 'space',
defaultScale: defaults.space,
},
left: {
property: 'left',
scale: 'space',
defaultScale: defaults.space,
},
}

@@ -15,0 +35,0 @@

@@ -15,1 +15,21 @@ import position from '../src'

})
test('returns theme values', () => {
const style = position({ top: 1, right: 2, bottom: 3, left: 4 })
expect(style).toEqual({ top: 4, right: 8, bottom: 16, left: 32 })
})
test('returns pixel values', () => {
const style = position({
top: '1px',
right: '2px',
bottom: '3px',
left: '4px',
})
expect(style).toEqual({
top: '1px',
right: '2px',
bottom: '3px',
left: '4px',
})
})
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