Comparing version 0.6.7 to 0.6.8
@@ -0,1 +1,9 @@ | ||
## 0.6.8 (December 06, 2016) | ||
- patch `:host...` implementation conflict with `:root...` | ||
## 0.6.7 (December 06, 2016) | ||
- add support for shadow dom selectors `:host, :host(selector), :host-context(selector)` | ||
## 0.6.6 (December 06, 2016) | ||
@@ -2,0 +10,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "stylis is a small css compiler", | ||
"version": "0.6.7", | ||
"version": "0.6.8", | ||
"homepage": "https://github.com/thysultan/stylis.js", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
@@ -179,3 +179,3 @@ # Stylis | ||
```html | ||
<script src=https://unpkg.com/stylis@0.6.7/stylis.min.js></script> | ||
<script src=https://unpkg.com/stylis@0.6.8/stylis.min.js></script> | ||
``` | ||
@@ -182,0 +182,0 @@ |
@@ -197,3 +197,3 @@ /*! | ||
// :host | ||
else if (firstChar === 58) { | ||
else if (firstChar === 58 && selector.charCodeAt(1) === 104) { | ||
var nextChar = (selector = selector.substring(5)).charCodeAt(0); | ||
@@ -213,3 +213,3 @@ | ||
} | ||
} | ||
} | ||
else { | ||
@@ -216,0 +216,0 @@ selector = prefix + (firstChar === 58 ? '' : ' ') + selector; |
@@ -1,1 +0,1 @@ | ||
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(global):"function"==typeof define&&define.amd?define(e(window)):window.stylis=e(window)}(function(e){"use strict";function t(e,t,i,r){var s="",n="",o=e.charCodeAt(0)||0;if(91===o){var l=e.substring(1,e.length-1).split("="),f=(n=l[1]).charCodeAt(0);34!==f&&39!==f||(n=n.substring(1,n.length-1)),s="["+l[0]+"='"+n+"']"}else n=35===o||46===o||62===o?(s=e).substring(1):s=e;for(var a=void 0===i||i===!0?n:"",d=void 0===r||r===!0?n:"",h="",u="",b="",c=t.length,g=0,v=0,o=0,w=0,A=1,C=0;g<c;){var m=t.charCodeAt(g);if(123===m||125===m||59===m){u+=t[g];var p=u.charCodeAt(0);32===p&&(p=(u=u.trim()).charCodeAt(0));var x=u.charCodeAt(1)||0;if(47===p&&42===x&&(p=(u=u.substring(u.indexOf("*/")+2)).charCodeAt(0),x=u.charCodeAt(1)||0),64===p)1===A&&(A=0,0!==h.length&&(h=s+" {"+h+"}")),107!==x&&114!==x||(v++,107===x?(b=u.substring(1,11)+a+u.substring(11),u="@-webkit-"+b,o=1):u="");else{var k=u.charCodeAt(2)||0;if(97===p&&110===x&&105===k){for(var y=u.substring(10).split(","),O="animation:",z=0,j=y.length;z<j;z++)O+=(0===z?"":",")+d+y[z].trim();u="-webkit-"+O+O}else if(97===p&&112===x&&112===k)u="-webkit-"+u+"-moz-"+u+u;else if(104===p&&121===x&&112===k||117===p&&115===x&&101===k)u="-webkit-"+u+"-moz-"+u+"-ms-"+u+u;else if(102===p&&108===x&&101===k||111===p&&114===x&&100===k)u="-webkit-"+u+u;else if(116===p&&114===x&&97===k)u="-webkit-"+u+(102===u.charCodeAt(5)?"-ms-"+u:"")+u;else if(100===p&&105===x&&115===k)u.indexOf("flex")>-1&&(u="display:-webkit-flex; display:flex;");else if(123===m&&(1===A&&(A=0,0!==h.length&&(h=s+" {"+h+"}")),0===v)){for(var q=u.split(","),O="",z=0,j=q.length;z<j;z++){var e=q[z],B=e.charCodeAt(0);if(32===B&&(B=(e=e.trim()).charCodeAt(0)),38===B)e=s+e.substring(1);else if(58===B){var D=(e=e.substring(5)).charCodeAt(0);e=40===D?s+e.substring(1).replace(")",""):45===D?e.substring(9,e.indexOf(")"))+" "+s+" {":s+e}else e=s+(58===B?"":" ")+e;O+=0===z?e:","+e}u=O}0!==v&&(125===m?w++:123===m&&0!==w&&w--,2===w?(0===o?u="":(u="}@"+b+"}",b=""),o=0,w=v>1?1:0,v--):1===o&&(b+=u))}h+=u,u="",C=0}else 1!==C||13!==m&&10!==m?9!==m&&13!==m&&10!==m&&(47===m&&0===C&&(C=1),u+=t[g]):u="";g++}return 1===A&&0!==h.length?s+" {"+h+"}":h}return t}); | ||
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(global):"function"==typeof define&&define.amd?define(e(window)):window.stylis=e(window)}(function(e){"use strict";function t(e,t,i,r){var s="",n="",o=e.charCodeAt(0)||0;if(91===o){var l=e.substring(1,e.length-1).split("="),a=(n=l[1]).charCodeAt(0);34!==a&&39!==a||(n=n.substring(1,n.length-1)),s="["+l[0]+"='"+n+"']"}else n=35===o||46===o||62===o?(s=e).substring(1):s=e;for(var d=void 0===i||i===!0?n:"",f=void 0===r||r===!0?n:"",h="",c="",u="",b=t.length,g=0,A=0,o=0,C=0,v=1,w=0;g<b;){var m=t.charCodeAt(g);if(123===m||125===m||59===m){c+=t[g];var p=c.charCodeAt(0);32===p&&(p=(c=c.trim()).charCodeAt(0));var x=c.charCodeAt(1)||0;if(47===p&&42===x&&(p=(c=c.substring(c.indexOf("*/")+2)).charCodeAt(0),x=c.charCodeAt(1)||0),64===p)1===v&&(v=0,0!==h.length&&(h=s+" {"+h+"}")),107!==x&&114!==x||(A++,107===x?(u=c.substring(1,11)+d+c.substring(11),c="@-webkit-"+u,o=1):c="");else{var k=c.charCodeAt(2)||0;if(97===p&&110===x&&105===k){for(var y=c.substring(10).split(","),O="animation:",z=0,j=y.length;z<j;z++)O+=(0===z?"":",")+f+y[z].trim();c="-webkit-"+O+O}else if(97===p&&112===x&&112===k)c="-webkit-"+c+"-moz-"+c+c;else if(104===p&&121===x&&112===k||117===p&&115===x&&101===k)c="-webkit-"+c+"-moz-"+c+"-ms-"+c+c;else if(102===p&&108===x&&101===k||111===p&&114===x&&100===k)c="-webkit-"+c+c;else if(116===p&&114===x&&97===k)c="-webkit-"+c+(102===c.charCodeAt(5)?"-ms-"+c:"")+c;else if(100===p&&105===x&&115===k)c.indexOf("flex")>-1&&(c="display:-webkit-flex; display:flex;");else if(123===m&&(1===v&&(v=0,0!==h.length&&(h=s+" {"+h+"}")),0===A)){for(var q=c.split(","),O="",z=0,j=q.length;z<j;z++){var e=q[z],B=e.charCodeAt(0);if(32===B&&(B=(e=e.trim()).charCodeAt(0)),38===B)e=s+e.substring(1);else if(58===B&&104===e.charCodeAt(1)){var D=(e=e.substring(5)).charCodeAt(0);e=40===D?s+e.substring(1).replace(")",""):45===D?e.substring(9,e.indexOf(")"))+" "+s+" {":s+e}else e=s+(58===B?"":" ")+e;O+=0===z?e:","+e}c=O}0!==A&&(125===m?C++:123===m&&0!==C&&C--,2===C?(0===o?c="":(c="}@"+u+"}",u=""),o=0,C=A>1?1:0,A--):1===o&&(u+=c))}h+=c,c="",w=0}else 1!==w||13!==m&&10!==m?9!==m&&13!==m&&10!==m&&(47===m&&0===w&&(w=1),c+=t[g]):c="";g++}return 1===v&&0!==h.length?s+" {"+h+"}":h}return t}); |
21445