satchel-css
Advanced tools
Comparing version 1.1.3 to 1.2.0
@@ -6,3 +6,3 @@ type Options = { | ||
declare const clearFix = "\n &::after{\n content: '';\n display: block;\n clear: both;\n }\n"; | ||
declare function rgba(hex: string, alpha?: number): string; | ||
declare function rgba(value: string, alpha?: number): string; | ||
declare function hex(r: number, g: number, b: number): string; | ||
@@ -9,0 +9,0 @@ declare function fluid(property: string, min: string, max: string, opts?: { |
@@ -6,3 +6,3 @@ type Options = { | ||
declare const clearFix = "\n &::after{\n content: '';\n display: block;\n clear: both;\n }\n"; | ||
declare function rgba(hex: string, alpha?: number): string; | ||
declare function rgba(value: string, alpha?: number): string; | ||
declare function hex(r: number, g: number, b: number): string; | ||
@@ -9,0 +9,0 @@ declare function fluid(property: string, min: string, max: string, opts?: { |
@@ -1,2 +0,2 @@ | ||
const e={expandable:" &::before { width: 1px; margin-left: -1px; float: left; } &::after { content: ''; display: table; clear: both; }",absolute:" position: relative; & > * { position: absolute !important; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; } &::before { position: relative; } ",lite:""};function t(t,n,o={mode:"absolute"}){return` ${e[o.mode]} &::before { content: ''; display: block; padding-top: ${n/t*100}%; } `}const n=" &::after{ content: ''; display: block; clear: both; }";function o(e,t=1){return`rgba(${function(e){const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,o)=>t+t+n+n+o+o),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map(e=>parseInt(e,16)):[]}(e)}, ${t})`}function i(e,t,n){return function(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}(e,t,n)}var r=function(e,t){t||(t=[0,""]),e=String(e);var n=parseFloat(e,10);return t[0]=n,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t},a={px:{px:1,cm:96/2.54,mm:96/25.4,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,in:25.4,pt:25.4/72,pc:25.4/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,in:72,pt:1,pc:12},pc:{px:6/96,cm:6/2.54,mm:6/25.4,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},turn:{deg:1/360,grad:1/400,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};function s(e,t,n,o){const i={minScreenSize:"480px",maxScreenSize:"1280px",...o};function s(e,t){const n={a:r(e)[0],b:r(t)[0]},o={a:r(e)[1],b:r(t)[1]};return o.a!==o.b&&(n.b=function(e,t,n,o){if(!a.hasOwnProperty(n))throw new Error("Cannot convert to "+n);if(!a[n].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+n);var i=a[n][t]*e;return!1!==o?(o=Math.pow(10,parseInt(o)||5),Math.round(i*o)/o):i}(n.b,o.b,o.a)),n.b-n.a}return` ${e}: calc(${t} + ${s(t,n)} * ((100vw - ${i.minScreenSize}) / ${s(i.minScreenSize,i.maxScreenSize)})); @media (max-width: ${i.minScreenSize}) { ${e}: ${t}; } @media (min-width: ${i.maxScreenSize}) { ${e}: ${n}; } `}const d={woff:"woff",woff2:"woff2",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"};function l(e,t,n){const o={display:"swap",...n};return` @font-face { font-family: "${e}"; src: ${t.map((function(e){return e?e&&`url("${e}") format("${d[e.split(".").pop()]}")`:null})).filter(Boolean).join(",\n")}; ${o.weight?`font-weight: ${o.weight};`:""} ${o.style?`font-style: ${o.style};`:""} font-display: ${o.display}; } `}const p={normalize:"/*! modern-normalize v0.6.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{padding:0}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}","normalize-legacy":"html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{margin:0}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,select{margin:0}button{overflow:visible;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}fieldset{padding:.35em .75em .625em}input{overflow:visible}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}select{text-transform:none}textarea{margin:0;overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}details,dialog{display:block}dialog{background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}dialog:not([open]){display:none}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}",remedy:"*,:after,:before{box-sizing:border-box}html{line-sizing:normal}body{margin:0}h1{font-size:2rem}h2{font-size:1.5rem}h3{font-size:1.17rem}h4{font-size:1rem}h5{font-size:.83rem}h6{font-size:.67rem}h1{margin:.67em 0}pre{white-space:pre-wrap}hr{border-style:solid;border-width:1px 0 0;color:inherit;height:0;overflow:visible}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle;max-width:100%}canvas,img,svg,video{height:auto}audio{width:100%}img{border-style:none}svg{overflow:hidden}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}"},m={saneEmbeds:" img, svg, video, canvas, audio, iframe, embed, object { display: inline-block; vertical-align: middle; max-width: 100%; } img, svg, video, canvas { height: auto; } ",hiddenProp:" [hidden] { display: none !important; } ",reduceMotion:" @media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-delay: -1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; background-attachment: initial !important; scroll-behavior: auto !important; transition-delay: 0s !important; transition-duration: 0s !important; } } ",fontSmoothing:" html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } ",resetMargins:" blockquote, dl, dd, h1, h2, h3, h4, h5, h6, figure, pre { margin: 0; } ",resetHeadings:" h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } "};function c({base:e="normalize",saneEmbeds:t=!0,hiddenProp:n=!0,reduceMotion:o=!0,...i}){const r={hiddenProp:n,reduceMotion:o,...i};return` ${e?p[e]:""} ${t&&"remedy"!==e?m.saneEmbeds:""} ${Object.keys(r).map(e=>r[e]&&m[e]).filter(Boolean).join("")} `}function b(e,t){const{top:n,right:o,bottom:i,left:r,important:a}=function(e){const t=e.match(/(([\+\-]?[0-9\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw)?)|(calc\(([^\)]+)\)|null|false|undefined|auto)/g),n={top:"auto",right:"auto",bottom:"auto",left:"auto"};if(!t)return n;switch(t.length){case 1:Object.keys(n).forEach(e=>n[e]=t[0]);break;case 2:Object.keys(n).forEach((e,o)=>n[e]=t[(o+1)%2?0:1]);break;case 3:Object.keys(n).forEach((e,o)=>n[e]=t[3===o?1:o]);break;case 4:Object.keys(n).forEach((e,o)=>n[e]=t[o])}return{...n,important:/!important$/.test(e)}}(t.toString());return` position: ${e}${a?" !important":""}; top: ${n}; right: ${o}; bottom: ${i}; left: ${r}; `}const u={track:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-moz-focus-outer { border: 0; } &::-webkit-slider-runnable-track { -webkit-appearance: none; ${t} } &::-moz-range-track { -moz-appearance: none; ${t} } &::-ms-track { ${t} }`},thumb:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-webkit-slider-thumb { -webkit-appearance: none; ${t} } &::-moz-range-thumb { -moz-appearance: none; ${t} } &::-ms-thumb { ${t} }`}},f={button:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; line-height: normal; -webkit-appearance: none; cursor: pointer; &::-moz-focus-inner { border: 0; padding: 0; } ",input:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; display: inline-block; vertical-align: middle; white-space: normal; background: none; line-height: 1; -webkit-appearance: none; ",list:" list-style: none; padding: 0; margin: 0; ",blockquote:" margin: 0; padding: 0; vertical-align: baseline; &::before, &::after { content: ''; } ",fieldset:" border: 0; padding: 0.01em 0 0 0; margin: 0; min-width: 0; body:not(:-moz-handler-blocked) & { display: table-cell; } ",legend:" padding: 0; display: table; "};function h(e){return f[e]}function g(e="2rem"){return` display: flex; flex-wrap: wrap; margin: calc(0px - (${e} / 2)); & > * { padding: calc(${e} / 2); } `}const y=" display: grid; grid-column: 1 / -1 !important; grid: inherit; grid-gap: inherit; grid-template-columns: inherit; -ms-grid-column: 1; -ms-grid-column-span: 99;";function w(e=5){const t=[];for(let n=1;n<=e;n++)t.push(`& > :nth-of-type(${n}) { -ms-grid-row: ${n}; }`);return""+t.join("\n")}function k(e,t=1){return t>1?(console.warn("The modifier given to lineCrop() must be <=1, you gave "+t),""):` &::before { content: ''; display: block; height: 0; width: 0; margin-top: calc(${+(t-e).toFixed(2)} * 0.5em); } `}export{t as aspect,n as clearFix,g as flexGrid,s as fluid,l as fontFace,i as hex,k as lineCrop,w as msGridRows,c as normalize,b as position,u as range,h as reset,o as rgba,y as subgrid}; | ||
const e={expandable:" &::before { width: 1px; margin-left: -1px; float: left; } &::after { content: ''; display: table; clear: both; }",absolute:" position: relative; & > * { position: absolute !important; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; } &::before { position: relative; } ",lite:""};function t(t,n,o={mode:"absolute"}){return` ${e[o.mode]} &::before { content: ''; display: block; padding-top: ${n/t*100}%; } `}const n=" &::after{ content: ''; display: block; clear: both; }";var o={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function i(e,t=1){return`rgba(${"#"===e.charAt(0)?function(e){const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,o)=>t+t+n+n+o+o),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map(e=>parseInt(e,16)):[]}(e):o[e].join(",")}, ${t})`}function r(e,t,n){return function(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}(e,t,n)}var a=function(e,t){t||(t=[0,""]),e=String(e);var n=parseFloat(e,10);return t[0]=n,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t},l={px:{px:1,cm:96/2.54,mm:96/25.4,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,in:25.4,pt:25.4/72,pc:25.4/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,in:72,pt:1,pc:12},pc:{px:6/96,cm:6/2.54,mm:6/25.4,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},turn:{deg:1/360,grad:1/400,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};function d(e,t,n,o){const i={minScreenSize:"480px",maxScreenSize:"1280px",...o};function r(e,t){const n={a:a(e)[0],b:a(t)[0]},o={a:a(e)[1],b:a(t)[1]};return o.a!==o.b&&(n.b=function(e,t,n,o){if(!l.hasOwnProperty(n))throw new Error("Cannot convert to "+n);if(!l[n].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+n);var i=l[n][t]*e;return!1!==o?(o=Math.pow(10,parseInt(o)||5),Math.round(i*o)/o):i}(n.b,o.b,o.a)),n.b-n.a}return` ${e}: calc(${t} + ${r(t,n)} * ((100vw - ${i.minScreenSize}) / ${r(i.minScreenSize,i.maxScreenSize)})); @media (max-width: ${i.minScreenSize}) { ${e}: ${t}; } @media (min-width: ${i.maxScreenSize}) { ${e}: ${n}; } `}const s={woff:"woff",woff2:"woff2",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"};function p(e,t,n){const o={display:"swap",...n};return` @font-face { font-family: "${e}"; src: ${t.map((function(e){return e?e&&`url("${e}") format("${s[e.split(".").pop()]}")`:null})).filter(Boolean).join(",\n")}; ${o.weight?`font-weight: ${o.weight};`:""} ${o.style?`font-style: ${o.style};`:""} font-display: ${o.display}; } `}const m={normalize:"/*! modern-normalize v0.6.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{padding:0}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}","normalize-legacy":"html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{margin:0}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,select{margin:0}button{overflow:visible;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}fieldset{padding:.35em .75em .625em}input{overflow:visible}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}select{text-transform:none}textarea{margin:0;overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}details,dialog{display:block}dialog{background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}dialog:not([open]){display:none}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}",remedy:"*,:after,:before{box-sizing:border-box}html{line-sizing:normal}body{margin:0}h1{font-size:2rem}h2{font-size:1.5rem}h3{font-size:1.17rem}h4{font-size:1rem}h5{font-size:.83rem}h6{font-size:.67rem}h1{margin:.67em 0}pre{white-space:pre-wrap}hr{border-style:solid;border-width:1px 0 0;color:inherit;height:0;overflow:visible}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle;max-width:100%}canvas,img,svg,video{height:auto}audio{width:100%}img{border-style:none}svg{overflow:hidden}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}"},c={saneEmbeds:" img, svg, video, canvas, audio, iframe, embed, object { display: inline-block; vertical-align: middle; max-width: 100%; } img, svg, video, canvas { height: auto; } ",hiddenProp:" [hidden] { display: none !important; } ",reduceMotion:" @media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-delay: -1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; background-attachment: initial !important; scroll-behavior: auto !important; transition-delay: 0s !important; transition-duration: 0s !important; } } ",fontSmoothing:" html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } ",resetMargins:" blockquote, dl, dd, h1, h2, h3, h4, h5, h6, figure, pre { margin: 0; } ",resetHeadings:" h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } "};function u({base:e="normalize",saneEmbeds:t=!0,hiddenProp:n=!0,reduceMotion:o=!0,...i}){const r={hiddenProp:n,reduceMotion:o,...i};return` ${e?m[e]:""} ${t&&"remedy"!==e?c.saneEmbeds:""} ${Object.keys(r).map(e=>r[e]&&c[e]).filter(Boolean).join("")} `}function b(e,t){const{top:n,right:o,bottom:i,left:r,important:a}=function(e){const t=e.match(/(([\+\-]?[0-9\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw)?)|(calc\(([^\)]+)\)|null|false|undefined|auto)/g),n={top:"auto",right:"auto",bottom:"auto",left:"auto"};if(!t)return n;switch(t.length){case 1:Object.keys(n).forEach(e=>n[e]=t[0]);break;case 2:Object.keys(n).forEach((e,o)=>n[e]=t[(o+1)%2?0:1]);break;case 3:Object.keys(n).forEach((e,o)=>n[e]=t[3===o?1:o]);break;case 4:Object.keys(n).forEach((e,o)=>n[e]=t[o])}return{...n,important:/!important$/.test(e)}}(t.toString());return` position: ${e}${a?" !important":""}; top: ${n}; right: ${o}; bottom: ${i}; left: ${r}; `}const g={track:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-moz-focus-outer { border: 0; } &::-webkit-slider-runnable-track { -webkit-appearance: none; ${t} } &::-moz-range-track { -moz-appearance: none; ${t} } &::-ms-track { ${t} }`},thumb:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-webkit-slider-thumb { -webkit-appearance: none; ${t} } &::-moz-range-thumb { -moz-appearance: none; ${t} } &::-ms-thumb { ${t} }`}},h={button:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; line-height: normal; -webkit-appearance: none; cursor: pointer; &::-moz-focus-inner { border: 0; padding: 0; } ",input:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; display: inline-block; vertical-align: middle; white-space: normal; background: none; line-height: 1; -webkit-appearance: none; ",list:" list-style: none; padding: 0; margin: 0; ",blockquote:" margin: 0; padding: 0; vertical-align: baseline; &::before, &::after { content: ''; } ",fieldset:" border: 0; padding: 0.01em 0 0 0; margin: 0; min-width: 0; body:not(:-moz-handler-blocked) & { display: table-cell; } ",legend:" padding: 0; display: table; "};function f(e){return h[e]}function y(e="2rem"){return` display: flex; flex-wrap: wrap; margin: calc(0px - (${e} / 2)); & > * { padding: calc(${e} / 2); } `}const w=" display: grid; grid-column: 1 / -1 !important; grid: inherit; grid-gap: inherit; grid-template-columns: inherit; -ms-grid-column: 1; -ms-grid-column-span: 99;";function k(e=5){const t=[];for(let n=1;n<=e;n++)t.push(`& > :nth-of-type(${n}) { -ms-grid-row: ${n}; }`);return""+t.join("\n")}function v(e,t=1){return t>1?(console.warn("The modifier given to lineCrop() must be <=1, you gave "+t),""):` &::before { content: ''; display: block; height: 0; width: 0; margin-top: calc(${+(t-e).toFixed(2)} * 0.5em); } `}export{t as aspect,n as clearFix,y as flexGrid,d as fluid,p as fontFace,r as hex,v as lineCrop,k as msGridRows,u as normalize,b as position,g as range,f as reset,i as rgba,w as subgrid}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["satchel-css"]={})}(this,(function(e){"use strict";const t={expandable:" &::before { width: 1px; margin-left: -1px; float: left; } &::after { content: ''; display: table; clear: both; }",absolute:" position: relative; & > * { position: absolute !important; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; } &::before { position: relative; } ",lite:""};var n=function(e,t){t||(t=[0,""]),e=String(e);var n=parseFloat(e,10);return t[0]=n,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t},o={px:{px:1,cm:96/2.54,mm:96/25.4,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,in:25.4,pt:25.4/72,pc:25.4/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,in:72,pt:1,pc:12},pc:{px:6/96,cm:6/2.54,mm:6/25.4,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},turn:{deg:1/360,grad:1/400,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};const i={woff:"woff",woff2:"woff2",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"};const r={normalize:"/*! modern-normalize v0.6.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{padding:0}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}","normalize-legacy":"html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{margin:0}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,select{margin:0}button{overflow:visible;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}fieldset{padding:.35em .75em .625em}input{overflow:visible}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}select{text-transform:none}textarea{margin:0;overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}details,dialog{display:block}dialog{background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}dialog:not([open]){display:none}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}",remedy:"*,:after,:before{box-sizing:border-box}html{line-sizing:normal}body{margin:0}h1{font-size:2rem}h2{font-size:1.5rem}h3{font-size:1.17rem}h4{font-size:1rem}h5{font-size:.83rem}h6{font-size:.67rem}h1{margin:.67em 0}pre{white-space:pre-wrap}hr{border-style:solid;border-width:1px 0 0;color:inherit;height:0;overflow:visible}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle;max-width:100%}canvas,img,svg,video{height:auto}audio{width:100%}img{border-style:none}svg{overflow:hidden}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}"},a={saneEmbeds:" img, svg, video, canvas, audio, iframe, embed, object { display: inline-block; vertical-align: middle; max-width: 100%; } img, svg, video, canvas { height: auto; } ",hiddenProp:" [hidden] { display: none !important; } ",reduceMotion:" @media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-delay: -1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; background-attachment: initial !important; scroll-behavior: auto !important; transition-delay: 0s !important; transition-duration: 0s !important; } } ",fontSmoothing:" html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } ",resetMargins:" blockquote, dl, dd, h1, h2, h3, h4, h5, h6, figure, pre { margin: 0; } ",resetHeadings:" h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } "};const s={track:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-moz-focus-outer { border: 0; } &::-webkit-slider-runnable-track { -webkit-appearance: none; ${t} } &::-moz-range-track { -moz-appearance: none; ${t} } &::-ms-track { ${t} }`},thumb:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-webkit-slider-thumb { -webkit-appearance: none; ${t} } &::-moz-range-thumb { -moz-appearance: none; ${t} } &::-ms-thumb { ${t} }`}},d={button:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; line-height: normal; -webkit-appearance: none; cursor: pointer; &::-moz-focus-inner { border: 0; padding: 0; } ",input:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; display: inline-block; vertical-align: middle; white-space: normal; background: none; line-height: 1; -webkit-appearance: none; ",list:" list-style: none; padding: 0; margin: 0; ",blockquote:" margin: 0; padding: 0; vertical-align: baseline; &::before, &::after { content: ''; } ",fieldset:" border: 0; padding: 0.01em 0 0 0; margin: 0; min-width: 0; body:not(:-moz-handler-blocked) & { display: table-cell; } ",legend:" padding: 0; display: table; "};e.aspect=function(e,n,o={mode:"absolute"}){return` ${t[o.mode]} &::before { content: ''; display: block; padding-top: ${n/e*100}%; } `},e.clearFix=" &::after{ content: ''; display: block; clear: both; }",e.flexGrid=function(e="2rem"){return` display: flex; flex-wrap: wrap; margin: calc(0px - (${e} / 2)); & > * { padding: calc(${e} / 2); } `},e.fluid=function(e,t,i,r){const a={minScreenSize:"480px",maxScreenSize:"1280px",...r};function s(e,t){const i={a:n(e)[0],b:n(t)[0]},r={a:n(e)[1],b:n(t)[1]};return r.a!==r.b&&(i.b=function(e,t,n,i){if(!o.hasOwnProperty(n))throw new Error("Cannot convert to "+n);if(!o[n].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+n);var r=o[n][t]*e;return!1!==i?(i=Math.pow(10,parseInt(i)||5),Math.round(r*i)/i):r}(i.b,r.b,r.a)),i.b-i.a}return` ${e}: calc(${t} + ${s(t,i)} * ((100vw - ${a.minScreenSize}) / ${s(a.minScreenSize,a.maxScreenSize)})); @media (max-width: ${a.minScreenSize}) { ${e}: ${t}; } @media (min-width: ${a.maxScreenSize}) { ${e}: ${i}; } `},e.fontFace=function(e,t,n){const o={display:"swap",...n};return` @font-face { font-family: "${e}"; src: ${t.map((function(e){return e?e&&`url("${e}") format("${i[e.split(".").pop()]}")`:null})).filter(Boolean).join(",\n")}; ${o.weight?`font-weight: ${o.weight};`:""} ${o.style?`font-style: ${o.style};`:""} font-display: ${o.display}; } `},e.hex=function(e,t,n){return function(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}(e,t,n)},e.lineCrop=function(e,t=1){return t>1?(console.warn("The modifier given to lineCrop() must be <=1, you gave "+t),""):` &::before { content: ''; display: block; height: 0; width: 0; margin-top: calc(${+(t-e).toFixed(2)} * 0.5em); } `},e.msGridRows=function(e=5){const t=[];for(let n=1;n<=e;n++)t.push(`& > :nth-of-type(${n}) { -ms-grid-row: ${n}; }`);return""+t.join("\n")},e.normalize=function({base:e="normalize",saneEmbeds:t=!0,hiddenProp:n=!0,reduceMotion:o=!0,...i}){const s={hiddenProp:n,reduceMotion:o,...i};return` ${e?r[e]:""} ${t&&"remedy"!==e?a.saneEmbeds:""} ${Object.keys(s).map(e=>s[e]&&a[e]).filter(Boolean).join("")} `},e.position=function(e,t){const{top:n,right:o,bottom:i,left:r,important:a}=function(e){const t=e.match(/(([\+\-]?[0-9\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw)?)|(calc\(([^\)]+)\)|null|false|undefined|auto)/g),n={top:"auto",right:"auto",bottom:"auto",left:"auto"};if(!t)return n;switch(t.length){case 1:Object.keys(n).forEach(e=>n[e]=t[0]);break;case 2:Object.keys(n).forEach((e,o)=>n[e]=t[(o+1)%2?0:1]);break;case 3:Object.keys(n).forEach((e,o)=>n[e]=t[3===o?1:o]);break;case 4:Object.keys(n).forEach((e,o)=>n[e]=t[o])}return{...n,important:/!important$/.test(e)}}(t.toString());return` position: ${e}${a?" !important":""}; top: ${n}; right: ${o}; bottom: ${i}; left: ${r}; `},e.range=s,e.reset=function(e){return d[e]},e.rgba=function(e,t=1){return`rgba(${function(e){const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,o)=>t+t+n+n+o+o),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map(e=>parseInt(e,16)):[]}(e)}, ${t})`},e.subgrid=" display: grid; grid-column: 1 / -1 !important; grid: inherit; grid-gap: inherit; grid-template-columns: inherit; -ms-grid-column: 1; -ms-grid-column-span: 99;",Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["satchel-css"]={})}(this,(function(e){"use strict";const t={expandable:" &::before { width: 1px; margin-left: -1px; float: left; } &::after { content: ''; display: table; clear: both; }",absolute:" position: relative; & > * { position: absolute !important; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; } &::before { position: relative; } ",lite:""};var n={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var o=function(e,t){t||(t=[0,""]),e=String(e);var n=parseFloat(e,10);return t[0]=n,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t},i={px:{px:1,cm:96/2.54,mm:96/25.4,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,in:25.4,pt:25.4/72,pc:25.4/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,in:72,pt:1,pc:12},pc:{px:6/96,cm:6/2.54,mm:6/25.4,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},turn:{deg:1/360,grad:1/400,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};const r={woff:"woff",woff2:"woff2",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"};const a={normalize:"/*! modern-normalize v0.6.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{padding:0}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}","normalize-legacy":"html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{margin:0}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,select{margin:0}button{overflow:visible;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}fieldset{padding:.35em .75em .625em}input{overflow:visible}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}select{text-transform:none}textarea{margin:0;overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}details,dialog{display:block}dialog{background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}dialog:not([open]){display:none}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}",remedy:"*,:after,:before{box-sizing:border-box}html{line-sizing:normal}body{margin:0}h1{font-size:2rem}h2{font-size:1.5rem}h3{font-size:1.17rem}h4{font-size:1rem}h5{font-size:.83rem}h6{font-size:.67rem}h1{margin:.67em 0}pre{white-space:pre-wrap}hr{border-style:solid;border-width:1px 0 0;color:inherit;height:0;overflow:visible}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle;max-width:100%}canvas,img,svg,video{height:auto}audio{width:100%}img{border-style:none}svg{overflow:hidden}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}"},l={saneEmbeds:" img, svg, video, canvas, audio, iframe, embed, object { display: inline-block; vertical-align: middle; max-width: 100%; } img, svg, video, canvas { height: auto; } ",hiddenProp:" [hidden] { display: none !important; } ",reduceMotion:" @media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-delay: -1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; background-attachment: initial !important; scroll-behavior: auto !important; transition-delay: 0s !important; transition-duration: 0s !important; } } ",fontSmoothing:" html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } ",resetMargins:" blockquote, dl, dd, h1, h2, h3, h4, h5, h6, figure, pre { margin: 0; } ",resetHeadings:" h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } "};const d={track:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-moz-focus-outer { border: 0; } &::-webkit-slider-runnable-track { -webkit-appearance: none; ${t} } &::-moz-range-track { -moz-appearance: none; ${t} } &::-ms-track { ${t} }`},thumb:function(e){const t="string"==typeof e?e:e.join();return` -webkit-appearance: none; &::-webkit-slider-thumb { -webkit-appearance: none; ${t} } &::-moz-range-thumb { -moz-appearance: none; ${t} } &::-ms-thumb { ${t} }`}},s={button:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; line-height: normal; -webkit-appearance: none; cursor: pointer; &::-moz-focus-inner { border: 0; padding: 0; } ",input:" font: inherit; color: inherit; border: 0; margin: 0; padding: 0; display: inline-block; vertical-align: middle; white-space: normal; background: none; line-height: 1; -webkit-appearance: none; ",list:" list-style: none; padding: 0; margin: 0; ",blockquote:" margin: 0; padding: 0; vertical-align: baseline; &::before, &::after { content: ''; } ",fieldset:" border: 0; padding: 0.01em 0 0 0; margin: 0; min-width: 0; body:not(:-moz-handler-blocked) & { display: table-cell; } ",legend:" padding: 0; display: table; "};e.aspect=function(e,n,o={mode:"absolute"}){return` ${t[o.mode]} &::before { content: ''; display: block; padding-top: ${n/e*100}%; } `},e.clearFix=" &::after{ content: ''; display: block; clear: both; }",e.flexGrid=function(e="2rem"){return` display: flex; flex-wrap: wrap; margin: calc(0px - (${e} / 2)); & > * { padding: calc(${e} / 2); } `},e.fluid=function(e,t,n,r){const a={minScreenSize:"480px",maxScreenSize:"1280px",...r};function l(e,t){const n={a:o(e)[0],b:o(t)[0]},r={a:o(e)[1],b:o(t)[1]};return r.a!==r.b&&(n.b=function(e,t,n,o){if(!i.hasOwnProperty(n))throw new Error("Cannot convert to "+n);if(!i[n].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+n);var r=i[n][t]*e;return!1!==o?(o=Math.pow(10,parseInt(o)||5),Math.round(r*o)/o):r}(n.b,r.b,r.a)),n.b-n.a}return` ${e}: calc(${t} + ${l(t,n)} * ((100vw - ${a.minScreenSize}) / ${l(a.minScreenSize,a.maxScreenSize)})); @media (max-width: ${a.minScreenSize}) { ${e}: ${t}; } @media (min-width: ${a.maxScreenSize}) { ${e}: ${n}; } `},e.fontFace=function(e,t,n){const o={display:"swap",...n};return` @font-face { font-family: "${e}"; src: ${t.map((function(e){return e?e&&`url("${e}") format("${r[e.split(".").pop()]}")`:null})).filter(Boolean).join(",\n")}; ${o.weight?`font-weight: ${o.weight};`:""} ${o.style?`font-style: ${o.style};`:""} font-display: ${o.display}; } `},e.hex=function(e,t,n){return function(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}(e,t,n)},e.lineCrop=function(e,t=1){return t>1?(console.warn("The modifier given to lineCrop() must be <=1, you gave "+t),""):` &::before { content: ''; display: block; height: 0; width: 0; margin-top: calc(${+(t-e).toFixed(2)} * 0.5em); } `},e.msGridRows=function(e=5){const t=[];for(let n=1;n<=e;n++)t.push(`& > :nth-of-type(${n}) { -ms-grid-row: ${n}; }`);return""+t.join("\n")},e.normalize=function({base:e="normalize",saneEmbeds:t=!0,hiddenProp:n=!0,reduceMotion:o=!0,...i}){const r={hiddenProp:n,reduceMotion:o,...i};return` ${e?a[e]:""} ${t&&"remedy"!==e?l.saneEmbeds:""} ${Object.keys(r).map(e=>r[e]&&l[e]).filter(Boolean).join("")} `},e.position=function(e,t){const{top:n,right:o,bottom:i,left:r,important:a}=function(e){const t=e.match(/(([\+\-]?[0-9\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw)?)|(calc\(([^\)]+)\)|null|false|undefined|auto)/g),n={top:"auto",right:"auto",bottom:"auto",left:"auto"};if(!t)return n;switch(t.length){case 1:Object.keys(n).forEach(e=>n[e]=t[0]);break;case 2:Object.keys(n).forEach((e,o)=>n[e]=t[(o+1)%2?0:1]);break;case 3:Object.keys(n).forEach((e,o)=>n[e]=t[3===o?1:o]);break;case 4:Object.keys(n).forEach((e,o)=>n[e]=t[o])}return{...n,important:/!important$/.test(e)}}(t.toString());return` position: ${e}${a?" !important":""}; top: ${n}; right: ${o}; bottom: ${i}; left: ${r}; `},e.range=d,e.reset=function(e){return s[e]},e.rgba=function(e,t=1){return`rgba(${"#"===e.charAt(0)?function(e){const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,o)=>t+t+n+n+o+o),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map(e=>parseInt(e,16)):[]}(e):n[e].join(",")}, ${t})`},e.subgrid=" display: grid; grid-column: 1 / -1 !important; grid: inherit; grid-gap: inherit; grid-template-columns: inherit; -ms-grid-column: 1; -ms-grid-column-span: 99;",Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "satchel-css", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "A little bag of CSS-in-JS superpowers", | ||
@@ -40,2 +40,3 @@ "main": "lib/index.js", | ||
"@csstools/normalize.css": "^10.1.0", | ||
"color-name": "^1.1.4", | ||
"css-unit-converter": "^1.1.1", | ||
@@ -42,0 +43,0 @@ "cssremedy": "0.1.0-beta.2", |
@@ -5,2 +5,48 @@ # Satchel | ||
A little bag of CSS-in-JS superpowers | ||
Satchel is a tiny collection of JavaScript utilities designed to be used in CSS-in-JS. \*\*\*\*It automates common patterns, saves time, encourages consistency, and makes developers' lives easier. | ||
## Features | ||
- [Configurable normalization](https://docs.satchel.style/normalize) | ||
- [Element-specific resets](https://docs.satchel.style/reset) | ||
- [Automagical fluid units](https://docs.satchel.style/fluid) | ||
- [Low-level grid helpers](https://docs.satchel.style/grids) | ||
- [Aspect-ratio tools](https://docs.satchel.style/aspect) | ||
- [Color transforms](https://docs.satchel.style/color) | ||
- [Font importer](https://docs.satchel.style/font) | ||
- [Positioning shorthands](https://docs.satchel.style/position) | ||
- [Range element abstractions](https://docs.satchel.style/range) | ||
- [Clearfix](https://docs.satchel.style/clearfix) | ||
All of Satchel’s utilities return plain strings, so they work almost everywhere. The only prerequisite is that your environment supports [nested CSS selectors](https://docs.satchel.style/https://tabatkins.github.io/specs/css-nesting/#nest-selector). Popular CSS-in frameworks like [styled-components](https://styled-components.com/), [Emotion](https://emotion.sh/), [Linaria](https://linaria.now.sh/), and any other tool built on top of the [Stylis](https://github.com/thysultan/stylis.js) preprocessor work out of the box. | ||
## Installation & Usage | ||
Install Satchel from NPM | ||
```bash | ||
npm i satchel-css | ||
``` | ||
Import Satchel’s utilities and embed them in CSS template strings by wrapping them in `${ }` braces. | ||
While Satchel’s utilities will work in plain strings, to support nested selectors out of the box you’ll probably want to use them alongside a CSS-in-JS library like [Emotion](https://emotion.sh) or [styled-components](https://styled-components.com). | ||
```javascript | ||
import { css } from '@emotion/core'; | ||
import { reset, fluid } from 'satchel-css'; | ||
const buttonStyles = css` | ||
${reset('button')} | ||
background: blue; | ||
color: white; | ||
`; | ||
const headingStyles = css` | ||
${fluid('font-size', '2rem', '3.5rem')}; | ||
`; | ||
``` | ||
## API | ||
Read the full documentation at **[satchel.style](https://satchel.style)** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
99066
215
52
6
1
+ Addedcolor-name@^1.1.4
+ Addedcolor-name@1.1.4(transitive)