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

nuke-core

Package Overview
Dependencies
Maintainers
4
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-core - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

5

HISTORY.md
# Changelog
## 0.2.1 / 2017-01-18
* [[a92e401](http://gitlab.alibaba-inc.com/nuke/core/commit/a92e40187d81709b6ec1611a0e7af91b7781d9e7)] - `feat` add mixins
* [[6985317](http://gitlab.alibaba-inc.com/nuke/core/commit/69853177bc20f57d48c2e9243358bb7f5d9138bc)] - `feat` add border function
## 0.2.0 / 2017-01-11

@@ -5,0 +10,0 @@

27

lib/util/_mixins.js

@@ -555,2 +555,4 @@ 'use strict';

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function padding() {

@@ -570,2 +572,24 @@ var pt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;

function border() {
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'solid';
var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '#ffffff';
var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
if (typeof width == 'string' && width.indexOf('px') > -1) {
width = width.split('px')[0] * 2;
}
if (direction) {
var _ref;
var x = direction[0].toUpperCase() + direction.slice(1);
return _ref = {}, _defineProperty(_ref, 'border' + x + 'Width', width), _defineProperty(_ref, 'border' + x + 'Style', style), _defineProperty(_ref, 'border' + x + 'Color', color), _ref;
} else {
return {
borderWidth: width,
borderStyle: style,
borderColor: color
};
}
}
// function marginTop(v) {

@@ -692,3 +716,4 @@ // @include dp2rem(marginTop, v);

// paddingLeft,
padding: padding
padding: padding,
border: border
};

2

package.json
{
"name": "nuke-core",
"version": "0.2.0",
"version": "0.2.1",
"description": "nuke核心变量",

@@ -5,0 +5,0 @@ "main": "lib/nuke",

@@ -555,3 +555,8 @@ 'use strict';

function padding(pt=0, pr=pt, pb=pt, pl=pr) {
function padding() {
var pt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var pr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pt;
var pb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : pt;
var pl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : pr;
return {

@@ -565,2 +570,21 @@ paddingTop: pt,

function border(width = 1, style = 'solid', color = '#ffffff',direction = null) {
if(typeof width == 'string' && width.indexOf('px') > -1){
width = width.split('px')[0]*2;
}
if(direction){
var x = direction[0].toUpperCase() + direction.slice(1);
return {
[`border${x}Width`]: width,
[`border${x}Style`]: style,
[`border${x}Color`]: color
};
}else{
return {
borderWidth: width,
borderStyle: style,
borderColor: color
};
}
}
// function marginTop(v) {

@@ -687,20 +711,4 @@ // @include dp2rem(marginTop, v);

// paddingLeft,
padding,
// marginTop,
// marginRight,
// marginBottom,
// marginLeft,
// margin,
// hairlines,
// border,
// borderTop,
// borderRight,
// borderBottom,
// borderLeft,
// borderRadius,
// borderTopLeftRadius,
// borderTopRightRadius,
// borderBottomRightRadius,
// borderBottomLeftRadius,
// borderWidth
}
padding: padding,
border:border
};
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