UNPKG

@hakit/components

Version:
17 lines (16 loc) 916 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=[1,2,3,4,5,6,7,8,9,10,11,12],p=t=>{const{xxs:e,xs:n,sm:r,md:i,lg:a}=t;return{xxs:`(max-width: ${e}px)`,xs:`(min-width: ${e+1}px) and (max-width: ${n}px)`,sm:`(min-width: ${n+1}px) and (max-width: ${r}px)`,md:`(min-width: ${r+1}px) and (max-width: ${i}px)`,lg:`(min-width: ${i+1}px) and (max-width: ${a}px)`,xlg:`(min-width: ${a+1}px)`}},s=(t,e)=>t.map(n=>` .bp-${n} & { ${e} } `).join(` `),x=t=>`calc( (100% - 11 * var(--gap, 0px)) * ${t} / 12 + (${t} - 1) * var(--gap, 0px) )`,o=t=>Object.entries(t).reduce((e,[n])=>{const r=m.map(i=>` .bp-${n} { .${n}-${i} { width: ${x(i)}; } } `);return e+r.join(` `)},"");exports.generateColumnBreakpoints=o;exports.getBreakpoints=p;exports.getColumnSizeCSS=x;exports.mq=s; //# sourceMappingURL=breakpoints.js.map