nuke-core
Advanced tools
Comparing version 0.2.0 to 0.2.1
# 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 @@ |
@@ -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 | ||
}; |
{ | ||
"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 | ||
}; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
350061
5077
0