Socket
Socket
Sign inDemoInstall

bss

Package Overview
Dependencies
0
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.3 to 1.2.4

34

bss.js

@@ -144,3 +144,5 @@ (function (global, factory) {

}, {
flex: ''
flex: '',
boxShadow: 'px',
border: 'px'
});

@@ -302,2 +304,4 @@

/* eslint no-invalid-this: 0 */
var shorts = Object.create(null);

@@ -400,9 +404,9 @@

function $nest(value, style) {
function $nest(selector, properties) {
var this$1 = this;
if (arguments.length === 1)
{ Object.keys(value).forEach(function (x) { return this$1.$nest(x, value[x]); }); }
else if (value)
{ value.split(selectorSplit).map(function (x) { return x.trim(); }).forEach(function (x) { return add(this$1.style, (x.charAt(0) === ':' ? '' : ' ') + x, parse(style)); }); }
{ Object.keys(selector).forEach(function (x) { return addNest(this$1.style, x, selector[x]); }); }
else if (selector)
{ addNest(this.style, selector, properties); }

@@ -412,2 +416,7 @@ return chain(this)

function addNest(style, selector, properties) {
selector.split(selectorSplit).map(function (x) { return x.trim(); }).forEach(function (x) { return add(style, (x.charAt(0) === ':' ? '' : ' ') + x, parse(properties)); }
);
}
pseudos.forEach(function (name) { return setProp('$' + hyphenToCamelCase(name.replace(/:/g, '')), function Pseudo(value, b) {

@@ -437,7 +446,13 @@ if (value || b)

if (arguments.length === 1)
{ return Object.keys(selector).forEach(function (key) { return css(key, selector[key]); }) }
{ Object.keys(selector).forEach(function (key) { return addCss(key, selector[key]); }); }
else
{ addCss(selector, style); }
insert(selector + '{' + stylesToCss(parse(style)) + '}', 0);
return chain(this)
}
function addCss(selector, style) {
objectToRules(parse(style)).forEach(function (c) { return insert(c.replace(/\.\$\.?\$?/g, selector)); });
}
function helper(name, styling) {

@@ -503,3 +518,4 @@ if (arguments.length === 1)

var key = tokens.shift()
, prop = key.charAt(0) === '-' && key.charAt(1) === '-'
, cssVar = key.charAt(0) === '-' && key.charAt(1) === '-'
, prop = cssVar
? key

@@ -515,3 +531,3 @@ : hyphenToCamelCase(key);

} else if (tokens.length > 0) {
add(acc, prev, tokens.reduce(function (acc, t) { return acc + addPx(prev, t) + ' '; }, '').trim());
add(acc, prev, tokens.map(function (t) { return cssVar ? t : addPx(prev, t); }).join(' '));
}

@@ -518,0 +534,0 @@

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.b=e()}(this,function(){"use strict";var i={ai:"alignItems",b:"bottom",bc:"backgroundColor",br:"borderRadius",bs:"boxShadow",c:"color",d:"display",f:"float",fd:"flexDirection",ff:"fontFamily",fs:"fontSize",h:"height",jc:"justifyContent",l:"left",lh:"lineHeight",ls:"letterSpacing",m:"margin",mb:"marginBottom",ml:"marginLeft",mr:"marginRight",mt:"marginTop",o:"opacity",p:"padding",pb:"paddingBottom",pl:"paddingLeft",pr:"paddingRight",pt:"paddingTop",r:"right",t:"top",ta:"textAlign",td:"textDecoration",tt:"textTransform",w:"width"},a=["float"].concat(Object.keys(function t(e){return e.hasOwnProperty("width")?e:t(Object.getPrototypeOf(e))}(document.documentElement.style)).filter(function(t){return-1===t.indexOf("-")&&"length"!==t}));var t=function(e,r){return void 0===r&&(r={}),function(t){return t in r?r[t]:r[t]=e(t)}};function o(t,e,r){if(!(e in t))return t[e]=r;t._fallback||Object.defineProperty(t,"_fallback",{configurable:!0,value:Object.create(null,{})}),o(t._fallback,e,r)}var c=Object.create(null,{}),l=Object.create(null,{}),f=/^(o|O|ms|MS|Ms|moz|Moz|webkit|Webkit|WebKit)([A-Z])/,r=t(function(t){var e=document.createElement("div");try{return e.style[t]="1px",e.style.setProperty(t,"1px"),"1px"===e.style[t].slice(-3)?"px":""}catch(t){return""}},{flex:""});function u(t,e){for(var r in e._fallback&&(t._fallback?u(t._fallback,e._fallback):Object.defineProperty(t,"_fallback",{value:e._fallback})),e)e.hasOwnProperty(r)&&(t[r]=e[r])}function s(t){return t.slice("-"===t.charAt(0)?1:0).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}var h=/,(?=(?:(?:[^"]*"){2})*[^"]*$)/;function p(i){return Object.keys(i).reduce(function(t,e){return t+(n=i[r=e],(f.test(r)?"-":"")+("-"===r.charAt(0)&&"-"===r.charAt(1)?r:r.replace(/([A-Z])/g,"-$1").toLowerCase())+":"+n+";");var r,n},"")+(i._fallback?p(i._fallback):"")}function d(t,e){return e in l?l[e]:y(t,e)}function y(t,e){return e+(isNaN(e)?"":r(t))}var e=window.document,n=e&&e.createElement("style");n&&e.head.appendChild(n);var b=n&&n.sheet,g=!1,m=Object.create(null,{}),v=[],j=0,k="b"+("000"+(46656*Math.random()|0).toString(36)).slice(-3)+("000"+(46656*Math.random()|0).toString(36)).slice(-3);function O(t,e){if(v.push(t),g)return n.textContent=v.join("\n");b&&b.insertRule(t,1<arguments.length?e:b.cssRules.length)}function A(t){var e=JSON.stringify(t);if(e in m)return m[e];for(var r=function e(r,n){void 0===n&&(n="");var i={},a=[];return r._fallback&&Object.defineProperty(i,"_fallback",{configurable:!0,value:r._fallback}),Object.keys(r).forEach(function(t){"@"===t.charAt(0)?a.push(t+"{"+e(r[t])+"}"):"object"==typeof r[t]?a=a.concat(e(r[t],n+t)):i[t]=r[t]}),Object.keys(i).length&&a.unshift((" "===n.charAt(0)?"":".$")+".$"+n+"{"+p(i)+"}"),a}(t),n=k+ ++j,i=0;i<r.length;i++)O(r[i].replace(/\.\$/g,"."+n));return m[e]=n}var x=Object.create(null);function w(t,e){var r=$(w);return u(r.style,R.apply(null,arguments)),r}function _(t,e){Object.defineProperty(w,t,{configurable:!0,value:e})}function $(t){var e=Object.create(w,{style:{value:t.style,enumerable:!0}});return t===w&&(w.style={}),e}function P(e){return function(t){return t||0===t?0<arguments.length&&o(this.style,e,1===arguments.length?d(e,t):Array.prototype.slice.call(arguments).map(function(t){return y(e,t)}).join(" ")):delete this.style[e],$(this)}}function E(e,r){if(1===arguments.length)return Object.keys(e).forEach(function(t){return E(t,e[t])});delete w[e],"object"==typeof r?(E[e]=R(r),Object.defineProperty(w,e,{configurable:!0,get:function(){return u(this.style,R(r)),$(this)}})):(E[e]=r,Object.defineProperty(w,e,{configurable:!0,value:function(){var t=r.apply(null,arguments);return u(this.style,t.style),$(this)}}))}function C(t){var e,r=(e=t).charAt(0)+(e.match(/([A-Z])/g)||[]).join("").toLowerCase(),n=i[r]&&i[r]!==t?t:r;return x[n]=t,n}Object.defineProperty(w,"valueOf",{configurable:!0,writable:!0,value:function(){return"."+this.class}}),w.style={},_("setDebug",function(t){g=t}),_("$keyframes",function(r){var t=Object.keys(r).reduce(function(t,e){return t+e+"{"+p(R(r[e]))+"}"},"");if(t in M)return M[t];var e=k+L++;return O("@keyframes "+(M[t]=e)+"{"+t+"}"),e}),_("$media",function(t,e){t&&o(this.style,"@media "+t,R(e));return $(this)}),_("$import",function(t){t&&O("@import "+t+";",0);return $(this)}),_("$nest",function(e,r){var n=this;1===arguments.length?Object.keys(e).forEach(function(t){return n.$nest(t,e[t])}):e&&e.split(h).map(function(t){return t.trim()}).forEach(function(t){return o(n.style,(":"===t.charAt(0)?"":" ")+t,R(r))});return $(this)}),_("getSheet",function(){var t=v.join("");return v=[],m=Object.create(null,{}),j=0,t}),_("helper",E),_("css",function e(r,t){if(1===arguments.length)return Object.keys(r).forEach(function(t){return e(t,r[t])});O(r+"{"+p(R(t))+"}",0)}),_("classPrefix",k),a.forEach(function(t){var e,r=t.match(f);if(r){var n=(e=t.replace(f,"$2")).charAt(0).toLowerCase()+e.slice(1);if(-1===a.indexOf(n))return"flexDirection"===n&&(l.flex="-"+r[1].toLowerCase()+"-flex"),_(n,P(c[n]=t)),void _(C(n),w[n])}_(t,P(t)),_(C(t),w[t])}),_("content",function(t){return this.style.content='"'+t+'"',$(this)}),Object.defineProperty(w,"class",{set:function(t){this.__class=t},get:function(){return this.__class||A(this.style)}}),[":active",":any",":checked",":default",":disabled",":empty",":enabled",":first",":first-child",":first-of-type",":fullscreen",":focus",":hover",":indeterminate",":in-range",":invalid",":last-child",":last-of-type",":left",":link",":only-child",":only-of-type",":optional",":out-of-range",":read-only",":read-write",":required",":right",":root",":scope",":target",":valid",":visited",":dir",":lang",":not",":nth-child",":nth-last-child",":nth-last-of-type",":nth-of-type","::after","::before","::first-letter","::first-line","::selection","::backdrop","::placeholder","::marker","::spelling-error","::grammar-error"].forEach(function(r){return _("$"+s(r.replace(/:/g,"")),function(t,e){return(t||e)&&o(this.style,r+(e?"("+t+")":""),R(e||t)),$(this)})}),w.helper("$animate",function(t,e){return w.animation(w.$keyframes(e)+" "+t)});var S=t(function(t){var a,c="";return t.trim().split(/;|\n/).reduce(function(t,e){if(e=c+e.trim(),c=","===e.charAt(e.length-1)?e:"")return t;if(","===e.charAt(0))return t[a]+=e,t;var r=e.match(/[^:\s]+/g);if(!r)return t;var n=r.shift(),i="-"===n.charAt(0)&&"-"===n.charAt(1)?n:s(n);return a=x[i]||i,i in E?u(t,"function"==typeof E[i]?E[i].apply(E,r).style:E[i]):0<r.length&&o(t,a,r.reduce(function(t,e){return t+y(a,e)+" "},"").trim()),t},{})}),L=0,M={};function R(t,e){var r,n;return"string"==typeof t?"string"==typeof e||"number"==typeof e?((r={})[t]=e,r):S(t):Array.isArray(t)&&Array.isArray(t.raw)?(t={raw:t},S(String.raw.apply(null,arguments))):t.style||(n=t,Object.keys(n).reduce(function(t,e){var r=n[e];return(r||0===r||""===r)&&("content"===e&&'"'!==r.charAt(0)?t[e]='"'+r+'"':t[e in c?c[e]:e]=d(e,r)),t},{}))}return w});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.b=e()}(this,function(){"use strict";var i={ai:"alignItems",b:"bottom",bc:"backgroundColor",br:"borderRadius",bs:"boxShadow",c:"color",d:"display",f:"float",fd:"flexDirection",ff:"fontFamily",fs:"fontSize",h:"height",jc:"justifyContent",l:"left",lh:"lineHeight",ls:"letterSpacing",m:"margin",mb:"marginBottom",ml:"marginLeft",mr:"marginRight",mt:"marginTop",o:"opacity",p:"padding",pb:"paddingBottom",pl:"paddingLeft",pr:"paddingRight",pt:"paddingTop",r:"right",t:"top",ta:"textAlign",td:"textDecoration",tt:"textTransform",w:"width"},a=["float"].concat(Object.keys(function t(e){return e.hasOwnProperty("width")?e:t(Object.getPrototypeOf(e))}(document.documentElement.style)).filter(function(t){return-1===t.indexOf("-")&&"length"!==t}));var t=function(e,n){return void 0===n&&(n={}),function(t){return t in n?n[t]:n[t]=e(t)}};function l(t,e,n){if(!(e in t))return t[e]=n;t._fallback||Object.defineProperty(t,"_fallback",{configurable:!0,value:Object.create(null,{})}),l(t._fallback,e,n)}var c=Object.create(null,{}),o=Object.create(null,{}),f=/^(o|O|ms|MS|Ms|moz|Moz|webkit|Webkit|WebKit)([A-Z])/,n=t(function(t){var e=document.createElement("div");try{return e.style[t]="1px",e.style.setProperty(t,"1px"),"1px"===e.style[t].slice(-3)?"px":""}catch(t){return""}},{flex:"",boxShadow:"px",border:"px"});function u(t,e){for(var n in e._fallback&&(t._fallback?u(t._fallback,e._fallback):Object.defineProperty(t,"_fallback",{value:e._fallback})),e)e.hasOwnProperty(n)&&(t[n]=e[n])}function s(t){return t.slice("-"===t.charAt(0)?1:0).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}function h(e,n){void 0===n&&(n="");var r={},i=[];return e._fallback&&Object.defineProperty(r,"_fallback",{configurable:!0,value:e._fallback}),Object.keys(e).forEach(function(t){"@"===t.charAt(0)?i.push(t+"{"+h(e[t])+"}"):"object"==typeof e[t]?i=i.concat(h(e[t],n+t)):r[t]=e[t]}),Object.keys(r).length&&i.unshift((" "===n.charAt(0)?"":".$")+".$"+n+"{"+p(r)+"}"),i}var r=/,(?=(?:(?:[^"]*"){2})*[^"]*$)/;function p(i){return Object.keys(i).reduce(function(t,e){return t+(r=i[n=e],(f.test(n)?"-":"")+("-"===n.charAt(0)&&"-"===n.charAt(1)?n:n.replace(/([A-Z])/g,"-$1").toLowerCase())+":"+r+";");var n,r},"")+(i._fallback?p(i._fallback):"")}function d(t,e){return e in o?o[e]:y(t,e)}function y(t,e){return e+(isNaN(e)?"":n(t))}var e=window.document,b=e&&e.createElement("style");b&&e.head.appendChild(b);var g=b&&b.sheet,m=!1,v=Object.create(null,{}),j=[],k=0,O="b"+("000"+(46656*Math.random()|0).toString(36)).slice(-3)+("000"+(46656*Math.random()|0).toString(36)).slice(-3);function x(t,e){if(j.push(t),m)return b.textContent=j.join("\n");g&&g.insertRule(t,1<arguments.length?e:g.cssRules.length)}var A=Object.create(null);function w(t,e){var n=$(w);return u(n.style,D.apply(null,arguments)),n}function _(t,e){Object.defineProperty(w,t,{configurable:!0,value:e})}function $(t){var e=Object.create(w,{style:{value:t.style,enumerable:!0}});return t===w&&(w.style={}),e}function P(e,t,n){t.split(r).map(function(t){return t.trim()}).forEach(function(t){return l(e,(":"===t.charAt(0)?"":" ")+t,D(n))})}function E(e){return function(t){return t||0===t?0<arguments.length&&l(this.style,e,1===arguments.length?d(e,t):Array.prototype.slice.call(arguments).map(function(t){return y(e,t)}).join(" ")):delete this.style[e],$(this)}}function S(e,t){h(D(t)).forEach(function(t){return x(t.replace(/\.\$\.?\$?/g,e))})}function C(e,n){if(1===arguments.length)return Object.keys(e).forEach(function(t){return C(t,e[t])});delete w[e],"object"==typeof n?(C[e]=D(n),Object.defineProperty(w,e,{configurable:!0,get:function(){return u(this.style,D(n)),$(this)}})):(C[e]=n,Object.defineProperty(w,e,{configurable:!0,value:function(){var t=n.apply(null,arguments);return u(this.style,t.style),$(this)}}))}function L(t){var e,n=(e=t).charAt(0)+(e.match(/([A-Z])/g)||[]).join("").toLowerCase(),r=i[n]&&i[n]!==t?t:n;return A[r]=t,r}Object.defineProperty(w,"valueOf",{configurable:!0,writable:!0,value:function(){return"."+this.class}}),w.style={},_("setDebug",function(t){m=t}),_("$keyframes",function(n){var t=Object.keys(n).reduce(function(t,e){return t+e+"{"+p(D(n[e]))+"}"},"");if(t in z)return z[t];var e=O+R++;return x("@keyframes "+(z[t]=e)+"{"+t+"}"),e}),_("$media",function(t,e){t&&l(this.style,"@media "+t,D(e));return $(this)}),_("$import",function(t){t&&x("@import "+t+";",0);return $(this)}),_("$nest",function(e,t){var n=this;1===arguments.length?Object.keys(e).forEach(function(t){return P(n.style,t,e[t])}):e&&P(this.style,e,t);return $(this)}),_("getSheet",function(){var t=j.join("");return j=[],v=Object.create(null,{}),k=0,t}),_("helper",C),_("css",function(e,t){1===arguments.length?Object.keys(e).forEach(function(t){return S(t,e[t])}):S(e,t);return $(this)}),_("classPrefix",O),a.forEach(function(t){var e,n=t.match(f);if(n){var r=(e=t.replace(f,"$2")).charAt(0).toLowerCase()+e.slice(1);if(-1===a.indexOf(r))return"flexDirection"===r&&(o.flex="-"+n[1].toLowerCase()+"-flex"),_(r,E(c[r]=t)),void _(L(r),w[r])}_(t,E(t)),_(L(t),w[t])}),_("content",function(t){return this.style.content='"'+t+'"',$(this)}),Object.defineProperty(w,"class",{set:function(t){this.__class=t},get:function(){return this.__class||function(t){var e=JSON.stringify(t);if(e in v)return v[e];for(var n=h(t),r=O+ ++k,i=0;i<n.length;i++)x(n[i].replace(/\.\$/g,"."+r));return v[e]=r}(this.style)}}),[":active",":any",":checked",":default",":disabled",":empty",":enabled",":first",":first-child",":first-of-type",":fullscreen",":focus",":hover",":indeterminate",":in-range",":invalid",":last-child",":last-of-type",":left",":link",":only-child",":only-of-type",":optional",":out-of-range",":read-only",":read-write",":required",":right",":root",":scope",":target",":valid",":visited",":dir",":lang",":not",":nth-child",":nth-last-child",":nth-last-of-type",":nth-of-type","::after","::before","::first-letter","::first-line","::selection","::backdrop","::placeholder","::marker","::spelling-error","::grammar-error"].forEach(function(n){return _("$"+s(n.replace(/:/g,"")),function(t,e){return(t||e)&&l(this.style,n+(e?"("+t+")":""),D(e||t)),$(this)})}),w.helper("$animate",function(t,e){return w.animation(w.$keyframes(e)+" "+t)});var M=t(function(t){var c,o="";return t.trim().split(/;|\n/).reduce(function(t,e){if(e=o+e.trim(),o=","===e.charAt(e.length-1)?e:"")return t;if(","===e.charAt(0))return t[c]+=e,t;var n=e.match(/[^:\s]+/g);if(!n)return t;var r=n.shift(),i="-"===r.charAt(0)&&"-"===r.charAt(1),a=i?r:s(r);return c=A[a]||a,a in C?u(t,"function"==typeof C[a]?C[a].apply(C,n).style:C[a]):0<n.length&&l(t,c,n.map(function(t){return i?t:y(c,t)}).join(" ")),t},{})}),R=0,z={};function D(t,e){var n,r;return"string"==typeof t?"string"==typeof e||"number"==typeof e?((n={})[t]=e,n):M(t):Array.isArray(t)&&Array.isArray(t.raw)?(t={raw:t},M(String.raw.apply(null,arguments))):t.style||(r=t,Object.keys(r).reduce(function(t,e){var n=r[e];return(n||0===n||""===n)&&("content"===e&&'"'!==n.charAt(0)?t[e]='"'+n+'"':t[e in c?c[e]:e]=d(e,n)),t},{}))}return w});
//# sourceMappingURL=bss.min.js.map
## [Unreleased]
## 1.2.4 -
Fix support for passing full bss objects to `b.css()`
Fix camel-case css variables issue
Fix auto adding px to border and box-shadow shorthand
## 1.2.3 -

@@ -4,0 +9,0 @@ Add `b.$import` for `@import` support

@@ -0,1 +1,2 @@

/* eslint no-invalid-this: 0 */
import pseudos from './pseudos'

@@ -16,2 +17,3 @@ import popular from './popular'

lowercaseFirst,
objectToRules,
selectorSplit,

@@ -128,7 +130,7 @@ cssProperties,

function $nest(value, style) {
function $nest(selector, properties) {
if (arguments.length === 1)
Object.keys(value).forEach(x => this.$nest(x, value[x]))
else if (value)
value.split(selectorSplit).map(x => x.trim()).forEach(x => add(this.style, (x.charAt(0) === ':' ? '' : ' ') + x, parse(style)))
Object.keys(selector).forEach(x => addNest(this.style, x, selector[x]))
else if (selector)
addNest(this.style, selector, properties)

@@ -138,2 +140,8 @@ return chain(this)

function addNest(style, selector, properties) {
selector.split(selectorSplit).map(x => x.trim()).forEach(x =>
add(style, (x.charAt(0) === ':' ? '' : ' ') + x, parse(properties))
)
}
pseudos.forEach(name =>

@@ -164,7 +172,13 @@ setProp('$' + hyphenToCamelCase(name.replace(/:/g, '')), function Pseudo(value, b) {

if (arguments.length === 1)
return Object.keys(selector).forEach(key => css(key, selector[key]))
Object.keys(selector).forEach(key => addCss(key, selector[key]))
else
addCss(selector, style)
insert(selector + '{' + stylesToCss(parse(style)) + '}', 0)
return chain(this)
}
function addCss(selector, style) {
objectToRules(parse(style)).forEach(c => insert(c.replace(/\.\$\.?\$?/g, selector)))
}
function helper(name, styling) {

@@ -231,3 +245,4 @@ if (arguments.length === 1)

const key = tokens.shift()
, prop = key.charAt(0) === '-' && key.charAt(1) === '-'
, cssVar = key.charAt(0) === '-' && key.charAt(1) === '-'
, prop = cssVar
? key

@@ -243,3 +258,3 @@ : hyphenToCamelCase(key)

} else if (tokens.length > 0) {
add(acc, prev, tokens.reduce((acc, t) => acc + addPx(prev, t) + ' ', '').trim())
add(acc, prev, tokens.map(t => cssVar ? t : addPx(prev, t)).join(' '))
}

@@ -246,0 +261,0 @@

@@ -42,3 +42,5 @@ export const cssProperties = ['float'].concat(Object.keys(

}, {
flex: ''
flex: '',
boxShadow: 'px',
border: 'px'
})

@@ -45,0 +47,0 @@

{
"name": "bss",
"version": "1.2.3",
"version": "1.2.4",
"description": "Better Style Sheets",

@@ -5,0 +5,0 @@ "main": "bss.js",

@@ -36,3 +36,4 @@ const o = require('ospec')

width: '0',
padding: ''
padding: '',
boxShadow: ''
}

@@ -72,6 +73,2 @@ }

o('recursive nest', function() {
})
o('css doulbe class for specificity generation', function() {

@@ -111,4 +108,4 @@ const cls = b`foo: bar;`.class

o('allows css variables', function() {
const cls = b('--primaryColor white').class
o(b.getSheet()).equals(`.${cls}.${cls}{--primaryColor:white;}`)
const cls = b('--primaryColor 250 250 250').class
o(b.getSheet()).equals(`.${cls}.${cls}{--primaryColor:250 250 250;}`)
})

@@ -126,2 +123,7 @@

o('nest objects', function() {
const cls = b.$nest({ th : b('background blue') }).class
o(b.getSheet()).equals(`.${cls} th{background:blue;}`)
})
o('add px', function() {

@@ -131,2 +133,4 @@ o(b`w 1`.style).deepEquals({ width: '1px' })

o(b({ width: 1 }).style).deepEquals({ width: '1px' })
o(b`boxShadow 1 1 10 black`.style).deepEquals({ boxShadow: '1px 1px 10px black' })
o(b`border 1 solid black`.style).deepEquals({ border: '1px solid black' })
o(b.w(1).style).deepEquals({ width: '1px' })

@@ -185,3 +189,3 @@ })

o('$css', function() {
o('css', function() {
b.css('html', 'background blue')

@@ -191,2 +195,12 @@ o(b.getSheet()).equals('html{background:blue;}')

o('css objects', function() {
b.css({ html: 'background blue' })
o(b.getSheet()).equals('html{background:blue;}')
})
o('css nest', function() {
b.css('html', b('background blue').$nest('li', 'background red'))
o(b.getSheet()).equals('html{background:blue;}html li{background:red;}')
})
o('$keyframes', function() {

@@ -193,0 +207,0 @@ const anim = b.$keyframes({

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc