polythene-core-css
Advanced tools
Comparing version 0.3.0 to 1.0.0-rc.1
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("polythene-core"),require("j2c-plugin-prefix-browser"),require("j2c")):"function"==typeof define&&define.amd?define(["exports","polythene-core","j2c-plugin-prefix-browser","j2c"],t):t(e.polythene=e.polythene||{},e["polythene-core"],e["j2c-plugin-prefix-browser"],e.j2c)}(this,function(e,t,i,n){"use strict";n="default"in n?n.default:n;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r={clearfix:function(){return{"&:after":{content:'""',display:"table",clear:"both"}}},defaultTransition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";return{transitionDelay:0,transitionDuration:arguments.length>1&&void 0!==arguments[1]?arguments[1]:".18s",transitionTimingFunction:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ease-out",transitionProperty:e}},ellipsis:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"px";return"none"===e?{textOverflow:"initial",overflow:"initial",display:"block",height:"auto",maxHeight:"none"}:l({},{overflow:"hidden",textOverflow:"ellipsis",textRendering:"auto"},void 0!==e?{"-webkit-line-clamp":e,"-webkit-box-orient":"vertical",display:"-webkit-box"}:null,void 0!==t?{maxHeight:e*t+i}:null)},fit:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+"px";return{position:"absolute",top:e,right:e,bottom:e,left:e}},fontSmoothing:function(){return!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}:{"-webkit-font-smoothing":"subpixel-antialiased","-moz-osx-font-smoothing":"auto"}},sticky:function(){return{position:"sticky",top:0,zIndex:arguments.length>0&&void 0!==arguments[0]?arguments[0]:1}}},o=[{display:"-webkit-box"},{display:"-moz-box"},{display:"-ms-flexbox","-ms-flex-preferred-size":"initial"},{display:"-webkit-flex"},{display:"flex"}],a=[o,{"-ms-flex-align":"center","-webkit-align-items":"center","align-items":"center"}],s=[o,{"-ms-flex-pack":"center","-webkit-justify-content":"center","justify-content":"center"}],f={flex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return[{"-webkit-box-flex":e},{"-moz-box-flex":e},{"-webkit-flex":e},{"-ms-flex":e},{flex:e},1===e?{"-webkit-flex-basis":"0.000000001px"}:{},1===e?{"flex-basis":"0.000000001px"}:{}]},flexAuto:{"-ms-flex":"1 1 auto","-webkit-flex-basis":"auto","flex-basis":"auto"},flexAutoVertical:{"-ms-flex":"1 1 auto","-webkit-flex-basis":"auto","flex-basis":"auto"},flexIndex:function(e){return{"-ms-flex":e,"-webkit-flex":e,flex:e}},flexGrow:function(e){return{"-webkit-flex-grow":e,"flex-grow":e}},layout:o,layoutAroundJustified:[o,{"-ms-flex-pack":"distribute","-webkit-justify-content":"space-around","justify-content":"space-around"}],layoutCenter:a,layoutCenterCenter:[s,a],layoutCenterJustified:s,layoutEnd:[o,{"-ms-flex-align":"end","-webkit-align-items":"flex-end","align-items":"flex-end"}],layoutEndJustified:[o,{"-ms-flex-pack":"end","-webkit-justify-content":"flex-end","justify-content":"flex-end"}],layoutHorizontal:[o,{"-ms-flex-direction":"row","-webkit-flex-direction":"row","flex-direction":"row"}],layoutHorizontalReverse:[o,{"-ms-flex-direction":"row-reverse","-webkit-flex-direction":"row-reverse","flex-direction":"row-reverse"}],layoutInline:[o,{display:"-ms-inline-flexbox"},{display:"-webkit-inline-flex"},{display:"inline-flex"}],layoutJustified:[o,{"-ms-flex-line-pack":"stretch","-ms-flex-pack":"justify","-webkit-justify-content":"space-between","justify-content":"space-between"}],layoutStart:[o,{"-ms-flex-align":"start","-webkit-align-items":"flex-start","align-items":"flex-start"}],layoutStartJustified:[o,{"-ms-flex-align":"start","-ms-flex-pack":"start","-webkit-justify-content":"flex-start","justify-content":"flex-start"}],layoutVertical:[o,{"-ms-flex-direction":"column","-webkit-flex-direction":"column","flex-direction":"column"}],layoutVerticalReverse:[o,{"-ms-flex-direction":"column-reverse","-webkit-flex-direction":"column-reverse","flex-direction":"column-reverse"}],layoutWrap:[o,{"-ms-flex-wrap":"wrap","-webkit-flex-wrap":"wrap","flex-wrap":"wrap"}],layoutWrapReverse:[o,{"-ms-flex-wrap":"wrap-reverse","-webkit-flex-wrap":"wrap-reverse","flex-wrap":"wrap-reverse"}],selfCenter:{"-ms-flex-item-align":"center","-ms-align-self":"center","-webkit-align-self":"center","align-self":"center"},selfEnd:{"-ms-flex-item-align":"end","-ms-align-self":"flex-end","-webkit-align-self":"flex-end","align-self":"flex-end"},selfStart:{"-ms-flex-item-align":"start","-ms-align-self":"flex-start","-webkit-align-self":"flex-start","align-self":"flex-start"},selfStretch:{"-ms-flex-item-align":"stretch","-ms-align-self":"stretch","-webkit-align-self":"stretch","align-self":"stretch"}},c=new n(i.prefixPlugin),u=/[^a-z0-9\-]/g,x=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];p.apply(void 0,[{id:e}].concat(i))},d=function(e){if(e){var t=document.getElementById(e);t&&t.parentNode&&t.parentNode.removeChild(t)}},p=function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),l=1;l<i;l++)n[l-1]=arguments[l];if(!t.isServer){var r=e.id.replace(u,"_"),o=e.document||window.document;d(r);var a=o.createElement("style");r&&a.setAttribute("id",r),n.forEach(function(e){Object.keys(e).length&&e.forEach(function(e){var t={"@global":e},i=c.sheet(t);a.appendChild(o.createTextNode(i))})}),o.head.appendChild(a)}},m={add:x,addToDocument:p,remove:d,generateStyles:function(e,t,i){var n=e.join(""),l=n.trim().replace(/^[^a-z]?(.*)/,"$1");x(l,i.map(function(e){return e(n,t)}))}};e.mixin=r,e.flex=f,e.styler=m,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("j2c-plugin-prefix-browser"),require("polythene-core"),require("j2c")):"function"==typeof define&&define.amd?define(["exports","j2c-plugin-prefix-browser","polythene-core","j2c"],t):t(e.polythene={},e["j2c-plugin-prefix-browser"],e["polythene-core"],e.j2c)}(this,function(e,t,i,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var l=[{display:"-webkit-box"},{display:"-moz-box"},{display:"-ms-flexbox","-ms-flex-preferred-size":"initial"},{display:"-webkit-flex"},{display:"flex"}],r=[l,{"-ms-flex-align":"center","-webkit-align-items":"center","align-items":"center"}],o=[l,{"-ms-flex-pack":"center","-webkit-justify-content":"center","justify-content":"center"}],a={flex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return[{"-webkit-box-flex":e},{"-moz-box-flex":e},{"-webkit-flex":e},{"-ms-flex":e},{flex:e},1===e?{"-webkit-flex-basis":"0.000000001px"}:{},1===e?{"flex-basis":"0.000000001px"}:{}]},flexAuto:{"-ms-flex":"1 1 auto","-webkit-flex-basis":"auto","flex-basis":"auto"},flexAutoVertical:{"-ms-flex":"1 1 auto","-webkit-flex-basis":"auto","flex-basis":"auto"},flexIndex:function(e){return{"-ms-flex":e,"-webkit-flex":e,flex:e}},flexGrow:function(e){return{"-webkit-flex-grow":e,"flex-grow":e}},layout:l,layoutAroundJustified:[l,{"-ms-flex-pack":"distribute","-webkit-justify-content":"space-around","justify-content":"space-around"}],layoutCenter:r,layoutCenterCenter:[o,r],layoutCenterJustified:o,layoutEnd:[l,{"-ms-flex-align":"end","-webkit-align-items":"flex-end","align-items":"flex-end"}],layoutEndJustified:[l,{"-ms-flex-pack":"end","-webkit-justify-content":"flex-end","justify-content":"flex-end"}],layoutHorizontal:[l,{"-ms-flex-direction":"row","-webkit-flex-direction":"row","flex-direction":"row"}],layoutHorizontalReverse:[l,{"-ms-flex-direction":"row-reverse","-webkit-flex-direction":"row-reverse","flex-direction":"row-reverse"}],layoutInline:[l,{display:"-ms-inline-flexbox"},{display:"-webkit-inline-flex"},{display:"inline-flex"}],layoutJustified:[l,{"-ms-flex-line-pack":"stretch","-ms-flex-pack":"justify","-webkit-justify-content":"space-between","justify-content":"space-between"}],layoutStart:[l,{"-ms-flex-align":"start","-webkit-align-items":"flex-start","align-items":"flex-start"}],layoutStartJustified:[l,{"-ms-flex-align":"start","-ms-flex-pack":"start","-webkit-justify-content":"flex-start","justify-content":"flex-start"}],layoutVertical:[l,{"-ms-flex-direction":"column","-webkit-flex-direction":"column","flex-direction":"column"}],layoutVerticalReverse:[l,{"-ms-flex-direction":"column-reverse","-webkit-flex-direction":"column-reverse","flex-direction":"column-reverse"}],layoutWrap:[l,{"-ms-flex-wrap":"wrap","-webkit-flex-wrap":"wrap","flex-wrap":"wrap"}],layoutWrapReverse:[l,{"-ms-flex-wrap":"wrap-reverse","-webkit-flex-wrap":"wrap-reverse","flex-wrap":"wrap-reverse"}],selfCenter:{"-ms-flex-item-align":"center","-ms-align-self":"center","-webkit-align-self":"center","align-self":"center"},selfEnd:{"-ms-flex-item-align":"end","-ms-align-self":"flex-end","-webkit-align-self":"flex-end","align-self":"flex-end"},selfStart:{"-ms-flex-item-align":"start","-ms-align-self":"flex-start","-webkit-align-self":"flex-start","align-self":"flex-start"},selfStretch:{"-ms-flex-item-align":"stretch","-ms-align-self":"stretch","-webkit-align-self":"stretch","align-self":"stretch"}},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},f={clearfix:function(){return{"&:after":{content:'""',display:"table",clear:"both"}}},defaultTransition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";return{transitionDelay:"0ms",transitionDuration:arguments.length>1&&void 0!==arguments[1]?arguments[1]:".18s",transitionTimingFunction:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ease-out",transitionProperty:e}},ellipsis:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"px";return"none"===e?{textOverflow:"initial",overflow:"initial",display:"block",height:"auto",maxHeight:"none"}:s({},{overflow:"hidden",textOverflow:"ellipsis",textRendering:"auto"},void 0!==e?{"-webkit-line-clamp":e,"-webkit-box-orient":"vertical",display:"-webkit-box"}:null,void 0!==t?{maxHeight:e*t+i}:null)},fit:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+"px";return{position:"absolute",top:e,right:e,bottom:e,left:e}},fontSmoothing:function(){return!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}:{"-webkit-font-smoothing":"subpixel-antialiased","-moz-osx-font-smoothing":"auto"}},sticky:function(){return{position:"sticky",top:0,zIndex:arguments.length>0&&void 0!==arguments[0]?arguments[0]:1}}},c=new n(t.prefixPlugin),u=/[^a-z0-9\\-]/g,x=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];p.apply(void 0,[{id:e}].concat(i))},d=function(e){if(!i.isServer&&e){var t=document.getElementById(e);t&&t.parentNode&&t.parentNode.removeChild(t)}},p=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),l=1;l<t;l++)n[l-1]=arguments[l];if(!i.isServer){var r=e.id.replace(u,"_"),o=e.document||window.document;d(r);var a=o.createElement("style");r&&a.setAttribute("id",r),n.forEach(function(e){Object.keys(e).length&&e.forEach(function(e){var t={"@global":e},i=c.sheet(t);a.appendChild(o.createTextNode(i))})}),o.head.appendChild(a)}},m={add:x,addToDocument:p,remove:d,generateStyles:function(e,t,i){var n=e.join(""),l=n.trim().replace(/^[^a-z]?(.*)/,"$1");x(l,i.map(function(e){return e(n,t)}))}},b=function(e){var t=parseInt(e.substring(1),16);return(t>>16&255)+","+(t>>8&255)+","+(255&t)},w=function(e){return"rgba("+e+","+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)+")"};e.flex=a,e.mixin=f,e.styler=m,e.hex=b,e.rgba=w,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=polythene-core-css.js.map |
{ | ||
"name": "polythene-core-css", | ||
"version": "0.3.0", | ||
"version": "1.0.0-rc.1", | ||
"description": "", | ||
@@ -10,3 +10,3 @@ "main": "dist/polythene-core-css.js", | ||
"rollup": "../../node_modules/rollup/bin/rollup -c ../../scripts/rollup.umd.js && ../../node_modules/rollup/bin/rollup -c ../../scripts/rollup.es.js", | ||
"build": "yarn run rollup" | ||
"build": "npm run rollup" | ||
}, | ||
@@ -20,4 +20,3 @@ "files": [ | ||
"j2c-plugin-prefix-browser": "^1.0.6", | ||
"mithril": "0.2.5", | ||
"polythene-core": "0.3.0" | ||
"polythene-core": "^1.0.0-rc.1" | ||
}, | ||
@@ -24,0 +23,0 @@ "author": "Arthur Clemens <arthurclemens@gmail.com> (http://visiblearea.com)", |
@@ -1,98 +0,5 @@ | ||
# CSS tools | ||
# polythene-core-css | ||
* `styler`: Wrapper around j2c to add styles to the head | ||
* `mixin`: CSS mixins | ||
* `flex`: CSS flex mixins | ||
Polythene utility package. | ||
## Styler | ||
~~~javascript | ||
import { styler } from "polythene-core-css"; | ||
const styles = [ | ||
{ | ||
".info": { | ||
"background-color": "#FF1744" | ||
} | ||
} | ||
]; | ||
styler.add("app", styles); | ||
~~~ | ||
### Styler functions | ||
* add | ||
* addToDocument | ||
* remove | ||
* styleComponent | ||
## Mixins | ||
~~~javascript | ||
import { mixin } from "polythene-core-css"; | ||
const styles = [{ | ||
".title": [ | ||
mixin.ellipsis(1) | ||
] | ||
}]; | ||
~~~ | ||
### Mixin functions | ||
* clearfix | ||
* createStyles | ||
* defaultTransition | ||
* ellipsis | ||
* fit | ||
* fontSmoothing | ||
* sticky | ||
* vendorize | ||
## Flexbox mixins | ||
~~~javascript | ||
import { flex } from "polythene-core-css"; | ||
const styles = [{ | ||
".horizontal-blocks": [ | ||
flex.layoutHorizontal | ||
] | ||
}]; | ||
~~~ | ||
### Flexbox mixin functions | ||
* flex | ||
* flexAuto | ||
* flexAutoVertical | ||
* flexIndex | ||
* flexGrow | ||
* layout | ||
* layoutAroundJustified | ||
* layoutCenter | ||
* layoutCenterCenter | ||
* layoutCenterJustified | ||
* layoutEnd | ||
* layoutEndJustified | ||
* layoutHorizontal | ||
* layoutHorizontalReverse | ||
* layoutInline | ||
* layoutJustified | ||
* layoutStart | ||
* layoutStartJustified | ||
* layoutVertical | ||
* layoutVerticalReverse | ||
* layoutWrap | ||
* layoutWrapReverse | ||
* selfCenter | ||
* selfEnd | ||
* selfStart | ||
* selfStretch | ||
[Documentation](https://github.com/ArthurClemens/polythene/blob/master/packages/docs/packages/polythene-core-css.md) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30535
3
403
6
+ Addedpolythene-core@1.7.5(transitive)
- Removedmithril@0.2.5
- Removedmithril@0.2.5(transitive)
- Removedpolythene-core@0.3.0(transitive)
Updatedpolythene-core@^1.0.0-rc.1