Comparing version 0.2.0 to 0.3.0
@@ -5,3 +5,3 @@ { | ||
"description": "stylis is a small css compiler", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/thysultan/stylis.js", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
@@ -62,2 +62,3 @@ # Stylis | ||
-webkit-transform: rotate(30deg); | ||
-moz-transform: rotate(30deg); | ||
transform: rotate(30deg); | ||
@@ -71,2 +72,3 @@ } | ||
-webkit-animation: userslidein 3s ease infinite; | ||
-moz-animation: userslidein 3s ease infinite; | ||
animation: userslidein 3s ease infinite; | ||
@@ -76,2 +78,3 @@ } | ||
-webkit-animation: userslidein 3s ease infinite; | ||
-moz-animation: userslidein 3s ease infinite; | ||
animation: userslidein 3s ease infinite; | ||
@@ -82,2 +85,3 @@ } | ||
-webkit-transform: translate(10px); | ||
-moz-transform: translate(10px); | ||
transform: translate(10px); | ||
@@ -87,8 +91,22 @@ } | ||
-webkit-transform: translate(200px); | ||
-moz-transform: translate(200px); | ||
transform: translate(200px); | ||
} | ||
} | ||
@-moz-keyframes userslidein { | ||
from { | ||
-webkit-transform: translate(10px); | ||
-moz-transform: translate(10px); | ||
transform: translate(10px); | ||
} | ||
to { | ||
-webkit-transform: translate(200px); | ||
-moz-transform: translate(200px); | ||
transform: translate(200px); | ||
} | ||
} | ||
@keyframes userslidein { | ||
from { | ||
-webkit-transform: translate(10px); | ||
-moz-transform: translate(10px); | ||
transform: translate(10px); | ||
@@ -98,2 +116,3 @@ } | ||
-webkit-transform: translate(200px); | ||
-moz-transform: translate(200px); | ||
transform: translate(200px); | ||
@@ -105,2 +124,3 @@ } | ||
-webkit-appearance: none; | ||
-moz-appearance: none; | ||
appearance: none; | ||
@@ -161,3 +181,3 @@ } | ||
```html | ||
<script src=https://unpkg.com/stylis@0.2.0/stylis.min.js></script> | ||
<script src=https://unpkg.com/stylis@0.3.0/stylis.min.js></script> | ||
``` | ||
@@ -278,2 +298,2 @@ | ||
If you want a picture into what can be done, there is an abstraction i created | ||
for [dio.js](https://github.com/thysultan/dio.js) that does away with the boilerplate entirely [http://jsbin.com/mozefe/1/edit?js,output](http://jsbin.com/mozefe/1/edit?js,output) | ||
for [dio.js](https://github.com/thysultan/dio.js) that does away with the above boilerplate entirely [http://jsbin.com/mozefe/1/edit?js,output](http://jsbin.com/mozefe/1/edit?js,output) |
@@ -181,10 +181,11 @@ /*! | ||
// vendor prefix transforms properties | ||
line = line.replace(rspaces, '').replace(rtrans, '-webkit-$1$1'); | ||
// vendor prefix transform properties within keyframes and @root blocks | ||
line = line.replace(rspaces, '').replace(rtrans, '-webkit-$1-moz-$1$1'); | ||
if (second === 107) { | ||
// vendor prefix keyframes | ||
line = '@-webkit-'+line+'}@'+line+'}'; | ||
// vendor prefix keyframes blocks | ||
line = '@-webkit-'+line+'}'+'@-moz-'+line+'}@'+line+'}'; | ||
} else { | ||
line = line.replace(rkeyf, '@-webkit-$1}@$1}'); | ||
// vendor prefix keyframes in @root block | ||
line = line.replace(rkeyf, '@-webkit-$1}@-moz-$1}@$1}'); | ||
} | ||
@@ -205,3 +206,3 @@ } | ||
// vendor prefix | ||
line = '-webkit-' + line + line; | ||
line = '-webkit-' + line + '-moz-' + line + line; | ||
} | ||
@@ -215,3 +216,3 @@ // transform: t, r, a | ||
// vendor prefix | ||
line = '-webkit-' + line + line; | ||
line = '-webkit-' + line + '-moz-' + line + line; | ||
} else { | ||
@@ -261,3 +262,3 @@ // selector declaration | ||
} | ||
// `\t`, `\r`, `\n` characters | ||
// not `\t`, `\r`, `\n` characters | ||
else if (code !== 9 && code !== 13 && code !== 10) { | ||
@@ -264,0 +265,0 @@ line += chars[i]; |
@@ -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 r(e,r,a){if(a){var l="stylis-";if(n){var s=a.nodeType;if(s&&"STYLE"===a.nodeName){var o=t(e[0],e.substring(1),r,!1);return a.appendChild(i.createTextNode(o)),a}var f=l+e;if(null!=i.getElementById(f))return null;var o=t(e[0],e.substring(1),r,!1);if(s){var d=i.createElement("style");return d.textContent=o,d.id=f,a.appendChild(d)}return a("style",{id:f},o)}var o=t(e[0],e.substring(1),r,!1);return'<style id="'+l+e+'">'+o+"</style>"}return t(e[0],e.substring(1),r,!1)}function t(e,r,t,i){for(var n=i?"["+e+"="+r+"]":e+r,f="",d=t.length,u=0,c="";u<d;){var p=t.charCodeAt(u);if(123===p||125===p||59===p){c+=t[u];var v=c.charCodeAt(0);if(32===v&&(v=(c=c.trim()).charCodeAt(0)),47===v)c=125===p?"}":"";else if(64===v){var b=c.charCodeAt(1)||0;if(107===b||114===b){u++,c=107==b?c.substring(1,11)+r+c.substring(11):"";for(var g=0;u<d;){var h=t[u++],y=h.charCodeAt(0);if(9!==y&&13!==y&&10!==y){if(125===y){if(1===g)break;g=1}else 123===y&&(g=0);c+=h}}c=c.replace(s,"").replace(l,"-webkit-$1$1"),c=107===b?"@-webkit-"+c+"}@"+c+"}":c.replace(a,"@-webkit-$1}@$1}")}}else{var b=c.charCodeAt(1)||0,m=c.charCodeAt(2)||0;if(97===v&&110===b&&105===m){var w=c.replace(o,"$1").split(":");c=w[0]+":"+r+w[1].split(",").join(","+r),c="-webkit-"+c+c}else if(116===v&&114===b&&97===m||97===v&&112===b&&112===m)c="-webkit-"+c+c;else if(123===p){for(var w=c.split(","),C="",A=0,k=w.length;A<k;A++){var $=w[A],x=$.charCodeAt(0),E="";E=0===A?58===x||38===x||123===x?n:n+" ":","+n,C+=123===x?E+$:38===x?E+$.substring(1):E+$}c=C}}f+=c,c=""}else 9!==p&&13!==p&&10!==p&&(c+=t[u]);u++}return f}var i=e.document||null,n=null!==i,a=/@(keyframes +.*?}$)/g,l=/(transform:.*?;)/g,s=/ +/g,o=/(,|:) +/g;return r.compiler=t,r}); | ||
!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 r(e,r,o){if(o){var a="stylis-";if(n){var l=o.nodeType;if(l&&"STYLE"===o.nodeName){var s=t(e[0],e.substring(1),r,!1);return o.appendChild(i.createTextNode(s)),o}var f=a+e;if(null!=i.getElementById(f))return null;var s=t(e[0],e.substring(1),r,!1);if(l){var d=i.createElement("style");return d.textContent=s,d.id=f,o.appendChild(d)}return o("style",{id:f},s)}var s=t(e[0],e.substring(1),r,!1);return'<style id="'+a+e+'">'+s+"</style>"}return t(e[0],e.substring(1),r,!1)}function t(e,r,t,i){for(var n=i?"["+e+"="+r+"]":e+r,f="",d=t.length,u=0,c="";u<d;){var p=t.charCodeAt(u);if(123===p||125===p||59===p){c+=t[u];var v=c.charCodeAt(0);if(32===v&&(v=(c=c.trim()).charCodeAt(0)),47===v)c=125===p?"}":"";else if(64===v){var m=c.charCodeAt(1)||0;if(107===m||114===m){u++,c=107==m?c.substring(1,11)+r+c.substring(11):"";for(var b=0;u<d;){var g=t[u++],h=g.charCodeAt(0);if(9!==h&&13!==h&&10!==h){if(125===h){if(1===b)break;b=1}else 123===h&&(b=0);c+=g}}c=c.replace(l,"").replace(a,"-webkit-$1-moz-$1$1"),c=107===m?"@-webkit-"+c+"}@-moz-"+c+"}@"+c+"}":c.replace(o,"@-webkit-$1}@-moz-$1}@$1}")}}else{var m=c.charCodeAt(1)||0,y=c.charCodeAt(2)||0;if(97===v&&110===m&&105===y){var w=c.replace(s,"$1").split(":");c=w[0]+":"+r+w[1].split(",").join(","+r),c="-webkit-"+c+"-moz-"+c+c}else if(116===v&&114===m&&97===y||97===v&&112===m&&112===y)c="-webkit-"+c+"-moz-"+c+c;else if(123===p){for(var w=c.split(","),C="",A=0,$=w.length;A<$;A++){var k=w[A],z=k.charCodeAt(0),x="";x=0===A?58===z||38===z||123===z?n:n+" ":","+n,C+=123===z?x+k:38===z?x+k.substring(1):x+k}c=C}}f+=c,c=""}else 9!==p&&13!==p&&10!==p&&(c+=t[u]);u++}return f}var i=e.document||null,n=null!==i,o=/@(keyframes +.*?}$)/g,a=/(transform:.*?;)/g,l=/ +/g,s=/(,|:) +/g;return r.compiler=t,r}); |
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
20391
231
290