@twind/preset-typography
Advanced tools
Comparing version 0.0.0-canary-3f42963d to 0.0.0-next-20221114103805
# @twind/preset-typography | ||
## 0.0.0-canary-3f42963d | ||
## 0.0.0-next-20221114103805 | ||
### Patch Changes | ||
- Updated dependencies [3f42963d]: | ||
- twind@0.0.0-canary-3f42963d | ||
- big documentation update ([`a63ca2cb`](https://github.com/tw-in-js/twind/commit/a63ca2cbf450d8a6f72f4d60f5856cee88d16911)) | ||
- update to @tailwindcss/typography@0.5.7 ([`089b8977`](https://github.com/tw-in-js/twind/commit/089b8977a185acfd8d43b6bddd7f6e815d0989bc)) | ||
- Updated dependencies [[`fe891f9c`](https://github.com/tw-in-js/twind/commit/fe891f9c7990a041e0eccaff9a4f58d0834d46d2), [`a63ca2cb`](https://github.com/tw-in-js/twind/commit/a63ca2cbf450d8a6f72f4d60f5856cee88d16911), [`e2c17a2e`](https://github.com/tw-in-js/twind/commit/e2c17a2e8087875f1725e3b07bc32218d2f0c2c0), [`d481948b`](https://github.com/tw-in-js/twind/commit/d481948b0513a59cc3495d5e31f0437c9690d59b), [`a61e0d1d`](https://github.com/tw-in-js/twind/commit/a61e0d1d4a31be6f398b57ceefffdb04b6bceccf), [`e6acbea2`](https://github.com/tw-in-js/twind/commit/e6acbea2f48e3c6441e0cf71cd069f48500ca493), [`2ac8e695`](https://github.com/tw-in-js/twind/commit/2ac8e6950ad37bac0eb88116448bee8738388f59), [`0705e419`](https://github.com/tw-in-js/twind/commit/0705e41946e191974da76c2b27019755520d9c0a)]: | ||
- twind@0.0.0-next-20221114103805 | ||
## 1.0.0 | ||
### Patch Changes | ||
- update to @tailwindcss/typography@0.5.7 (089b8977) | ||
- Updated dependencies [fe891f9c, e2c17a2e, d481948b, e6acbea2, 2ac8e695, 0705e419]: | ||
- twind@1.0.0 | ||
## 1.0.0-next.39 | ||
@@ -11,0 +24,0 @@ |
{ | ||
"name": "@twind/preset-typography", | ||
"version": "0.0.0-canary-3f42963d", | ||
"description": "Typography preset for twind", | ||
"version": "0.0.0-next-20221114103805", | ||
"description": "A twind preset that provides a set of `prose` classes you can use to add beautiful typographic defaults to any vanilla HTML you don't control, like HTML rendered from Markdown, or pulled from a CMS.", | ||
"type": "module", | ||
@@ -71,3 +71,3 @@ "homepage": "https://twind.style", | ||
"peerDependencies": { | ||
"twind": "0.0.0-canary-3f42963d", | ||
"twind": "0.0.0-next-20221114103805", | ||
"typescript": "^4.8.4" | ||
@@ -81,7 +81,6 @@ }, | ||
"publishConfig": { | ||
"tag": "next", | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
"@swc/helpers": "^0.4.12" | ||
"@swc/helpers": "^0.4.11" | ||
}, | ||
@@ -88,0 +87,0 @@ "module": "./preset-typography.js", |
@@ -1,1 +0,1 @@ | ||
import{withAutocomplete as t,toColorValue as e}from"twind";function o(e,o){return t(e,o)}function r({className:t="prose",defaultColor:r="gray",extend:d={},colors:p={}}={}){return p={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...p,dark:null===p.dark?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...p.dark}},{variants:[["headings","h1,h2,h3,h4,th"],["lead",".lead"],["h1"],["h2"],["h3"],["h4"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"]].map(([e,o=e])=>[`${t}-${e}`,(e,r)=>n(t,"."==o[0]?"."+r.e(r.h(o.slice(1))):o,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${t})`,({1:t},{h:e})=>[{c:e(t)}]],[`${t}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",o(({$$:t},e)=>{let o=l(e.theme("fontSize",t));return o&&{"@layer components":o}},(t,{theme:e})=>Object.keys(e("fontSize")))],[t+"-",o(({$$:t},e)=>s(t,e),(t,{theme:e})=>Object.keys(e("colors")).filter(t=>t&&"DEFAULT"!=t&&!/[.-]/.test(t)))],[t,(e,o)=>({...s(r,o),"@layer base":[i(t,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:a(20,16),marginBottom:a(20,16),paddingLeft:a(26,16)},li:{marginTop:a(8,16),marginBottom:a(8,16)},"ol>li,ul>li":{paddingLeft:a(6,16)},">ul>li p":{marginTop:a(12,16),marginBottom:a(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:a(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:a(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:a(12,16),marginBottom:a(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:a(48,16),marginBottom:a(48,16)},blockquote:{marginTop:a(32,20),marginBottom:a(32,20),paddingLeft:a(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:a(20,16),marginBottom:a(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:a(36,16),marginTop:"0",marginBottom:a(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:a(24,16),marginTop:a(48,24),marginBottom:a(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:a(20,16),marginTop:a(32,20),marginBottom:a(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:a(24,16),marginBottom:a(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:a(32,16),marginBottom:a(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:a(14,16),lineHeight:"1.4",marginTop:a(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:a(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:a(21,24)},"h3 code":{fontSize:a(18,20)},"a code":{color:"var(--tw-prose-links)"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:a(14,16),lineHeight:"1.7",marginTop:a(24,14),marginBottom:a(24,14),borderRadius:"0.375rem",paddingTop:a(12,14),paddingRight:a(16,14),paddingBottom:a(12,14),paddingLeft:a(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:a(32,16),marginBottom:a(32,16),fontSize:a(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td":{verticalAlign:"baseline",paddingTop:a(8,14),paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"tbody td:first-child":{paddingLeft:"0"},"tbody td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:a(20,16),lineHeight:"1.6",marginTop:a(24,20),marginBottom:a(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),i(t,o,d)],"@layer components":{...l(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function s(t,o){let r={},i={},n=(r,n,l)=>{let a=o.theme(`colors.${t}.${n}`,n);l["--tw-prose-"+r]=e(a);let d=l!=i&&o.d("colors",`${t}.${n}`,a);d&&(i["--tw-prose-"+r]=e(d))};for(let l in p){let a=p[l];"dark"!=l&&a&&n(l,a,r)}for(let d in p.dark||{}){let s=p.dark[d];s&&(p.dark?n("invert-"+d,s,r):n(d,s,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[o.v("dark")]:i}}:void 0}}function i(t,e,o){let r={};for(let i in o)r[n(t,i,e,o=>`.${e.e(e.h(t))}${o}`)]=o[i];return r}function n(t,e,{e:o,h:r},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(e,n=" ",l=e,a="")=>i(`${n}:where(${l}):not(:where(.${o(r("not-"+t))} *))${a}`))}function l(t){return t?"string"==typeof t?{fontSize:t}:{fontSize:t[0],..."string"==typeof t[1]?{lineHeight:t[1]}:t[1]}:void 0}function a(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}export{r as default};//# sourceMappingURL=preset-typography.browser.dev.js.map | ||
import{withAutocomplete as t,toColorValue as o}from"twind";function e(o,e){return t(o,e)}function r({className:t="prose",defaultColor:r="gray",extend:d={},colors:p={}}={}){return p={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...p,dark:null===p.dark?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...p.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([o,e=o])=>[`${t}-${o}`,(o,r)=>n(t,"."==e[0]?"."+r.e(r.h(e.slice(1))):e,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${t})`,({1:t},{h:o})=>[{c:o(t)}]],[`${t}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",e(({$$:t},o)=>{let e=l(o.theme("fontSize",t));return e&&{"@layer components":e}},(t,{theme:o})=>Object.keys(o("fontSize")))],[t+"-",e(({$$:t},o)=>s(t,o),(t,{theme:o})=>Object.keys(o("colors")).filter(t=>t&&"DEFAULT"!=t&&!/[.-]/.test(t)))],[t,(o,e)=>({...s(r,e),"@layer base":[i(t,e,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:a(20,16),marginBottom:a(20,16),paddingLeft:a(26,16)},li:{marginTop:a(8,16),marginBottom:a(8,16)},"ol>li,ul>li":{paddingLeft:a(6,16)},">ul>li p":{marginTop:a(12,16),marginBottom:a(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:a(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:a(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:a(12,16),marginBottom:a(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:a(48,16),marginBottom:a(48,16)},blockquote:{marginTop:a(32,20),marginBottom:a(32,20),paddingLeft:a(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:a(20,16),marginBottom:a(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:a(36,16),marginTop:"0",marginBottom:a(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:a(24,16),marginTop:a(48,24),marginBottom:a(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:a(20,16),marginTop:a(32,20),marginBottom:a(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:a(24,16),marginBottom:a(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:a(32,16),marginBottom:a(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:a(14,16),lineHeight:"1.4",marginTop:a(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:a(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:a(21,24)},"h3 code":{fontSize:a(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:a(14,16),lineHeight:"1.7",marginTop:a(24,14),marginBottom:a(24,14),borderRadius:"0.375rem",paddingTop:a(12,14),paddingRight:a(16,14),paddingBottom:a(12,14),paddingLeft:a(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:a(32,16),marginBottom:a(32,16),fontSize:a(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:a(8,14),paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${e.e(e.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:a(20,16),lineHeight:"1.6",marginTop:a(24,20),marginBottom:a(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),i(t,e,d)],"@layer components":{...l(e.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function s(t,e){let r={},i={},n=(r,n,l)=>{let a=e.theme(`colors.${t}.${n}`,n);l["--tw-prose-"+r]=o(a);let d=l!=i&&e.d("colors",`${t}.${n}`,a);d&&(i["--tw-prose-"+r]=o(d))};for(let l in p){let a=p[l];"dark"!=l&&a&&n(l,a,r)}for(let d in p.dark||{}){let s=p.dark[d];s&&(p.dark?n("invert-"+d,s,r):n(d,s,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[e.v("dark")]:i}}:void 0}}function i(t,o,e){let r={};for(let i in e)r[n(t,i,o,e=>`.${o.e(o.h(t))}${e}`)]=e[i];return r}function n(t,o,{e,h:r},i){return o.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(o,n=" ",l=o,a="")=>i(`${n}:where(${l}):not(:where(.${e(r("not-"+t))} *))${a}`))}function l(t){return t?"string"==typeof t?{fontSize:t}:{fontSize:t[0],..."string"==typeof t[1]?{lineHeight:t[1]}:t[1]}:void 0}function a(t,o){return`${(t/o).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}export{r as default};//# sourceMappingURL=preset-typography.browser.dev.js.map |
@@ -1,1 +0,1 @@ | ||
import{toColorValue as t}from"twind";function e(t){return t}function o({className:o="prose",defaultColor:a="gray",extend:d={},colors:p={}}={}){return p={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...p,dark:null===p.dark?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...p.dark}},{variants:[["headings","h1,h2,h3,h4,th"],["lead",".lead"],["h1"],["h2"],["h3"],["h4"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"]].map(([t,e=t])=>[`${o}-${t}`,(t,r)=>i(o,"."==e[0]?"."+r.e(r.h(e.slice(1))):e,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${o})`,({1:t},{h:e})=>[{c:e(t)}]],[`${o}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[o+"-",e(({$$:t},e)=>{let o=n(e.theme("fontSize",t));return o&&{"@layer components":o}})],[o+"-",e(({$$:t},e)=>s(t,e))],[o,(t,e)=>({...s(a,e),"@layer base":[r(o,e,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:l(20,16),marginBottom:l(20,16),paddingLeft:l(26,16)},li:{marginTop:l(8,16),marginBottom:l(8,16)},"ol>li,ul>li":{paddingLeft:l(6,16)},">ul>li p":{marginTop:l(12,16),marginBottom:l(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:l(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:l(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:l(12,16),marginBottom:l(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:l(48,16),marginBottom:l(48,16)},blockquote:{marginTop:l(32,20),marginBottom:l(32,20),paddingLeft:l(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:l(20,16),marginBottom:l(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:l(36,16),marginTop:"0",marginBottom:l(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:l(24,16),marginTop:l(48,24),marginBottom:l(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:l(20,16),marginTop:l(32,20),marginBottom:l(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:l(24,16),marginBottom:l(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:l(32,16),marginBottom:l(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:l(14,16),lineHeight:"1.4",marginTop:l(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:l(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:l(21,24)},"h3 code":{fontSize:l(18,20)},"a code":{color:"var(--tw-prose-links)"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:l(14,16),lineHeight:"1.7",marginTop:l(24,14),marginBottom:l(24,14),borderRadius:"0.375rem",paddingTop:l(12,14),paddingRight:l(16,14),paddingBottom:l(12,14),paddingLeft:l(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:l(32,16),marginBottom:l(32,16),fontSize:l(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td":{verticalAlign:"baseline",paddingTop:l(8,14),paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"tbody td:first-child":{paddingLeft:"0"},"tbody td:last-child":{paddingRight:"0"},[`.${e.e(e.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:l(20,16),lineHeight:"1.6",marginTop:l(24,20),marginBottom:l(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),r(o,e,d)],"@layer components":{...n(e.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function s(e,o){let r={},i={},n=(r,n,l)=>{let a=o.theme(`colors.${e}.${n}`,n);l["--tw-prose-"+r]=t(a);let d=l!=i&&o.d("colors",`${e}.${n}`,a);d&&(i["--tw-prose-"+r]=t(d))};for(let l in p){let a=p[l];"dark"!=l&&a&&n(l,a,r)}for(let d in p.dark||{}){let s=p.dark[d];s&&(p.dark?n("invert-"+d,s,r):n(d,s,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[o.v("dark")]:i}}:void 0}}function r(t,e,o){let r={};for(let n in o)r[i(t,n,e,o=>`.${e.e(e.h(t))}${o}`)]=o[n];return r}function i(t,e,{e:o,h:r},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(e,n=" ",l=e,a="")=>i(`${n}:where(${l}):not(:where(.${o(r("not-"+t))} *))${a}`))}function n(t){return t?"string"==typeof t?{fontSize:t}:{fontSize:t[0],..."string"==typeof t[1]?{lineHeight:t[1]}:t[1]}:void 0}function l(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}export{o as default};//# sourceMappingURL=preset-typography.browser.js.map | ||
import{toColorValue as t}from"twind";function o(t){return t}function e({className:e="prose",defaultColor:a="gray",extend:d={},colors:p={}}={}){return p={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...p,dark:null===p.dark?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...p.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([t,o=t])=>[`${e}-${t}`,(t,r)=>i(e,"."==o[0]?"."+r.e(r.h(o.slice(1))):o,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${e})`,({1:t},{h:o})=>[{c:o(t)}]],[`${e}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[e+"-",o(({$$:t},o)=>{let e=n(o.theme("fontSize",t));return e&&{"@layer components":e}})],[e+"-",o(({$$:t},o)=>s(t,o))],[e,(t,o)=>({...s(a,o),"@layer base":[r(e,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:l(20,16),marginBottom:l(20,16),paddingLeft:l(26,16)},li:{marginTop:l(8,16),marginBottom:l(8,16)},"ol>li,ul>li":{paddingLeft:l(6,16)},">ul>li p":{marginTop:l(12,16),marginBottom:l(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:l(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:l(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:l(12,16),marginBottom:l(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:l(48,16),marginBottom:l(48,16)},blockquote:{marginTop:l(32,20),marginBottom:l(32,20),paddingLeft:l(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:l(20,16),marginBottom:l(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:l(36,16),marginTop:"0",marginBottom:l(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:l(24,16),marginTop:l(48,24),marginBottom:l(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:l(20,16),marginTop:l(32,20),marginBottom:l(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:l(24,16),marginBottom:l(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:l(32,16),marginBottom:l(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:l(14,16),lineHeight:"1.4",marginTop:l(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:l(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:l(21,24)},"h3 code":{fontSize:l(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:l(14,16),lineHeight:"1.7",marginTop:l(24,14),marginBottom:l(24,14),borderRadius:"0.375rem",paddingTop:l(12,14),paddingRight:l(16,14),paddingBottom:l(12,14),paddingLeft:l(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:l(32,16),marginBottom:l(32,16),fontSize:l(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:l(8,14),paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:l(20,16),lineHeight:"1.6",marginTop:l(24,20),marginBottom:l(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),r(e,o,d)],"@layer components":{...n(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function s(o,e){let r={},i={},n=(r,n,l)=>{let a=e.theme(`colors.${o}.${n}`,n);l["--tw-prose-"+r]=t(a);let d=l!=i&&e.d("colors",`${o}.${n}`,a);d&&(i["--tw-prose-"+r]=t(d))};for(let l in p){let a=p[l];"dark"!=l&&a&&n(l,a,r)}for(let d in p.dark||{}){let s=p.dark[d];s&&(p.dark?n("invert-"+d,s,r):n(d,s,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[e.v("dark")]:i}}:void 0}}function r(t,o,e){let r={};for(let n in e)r[i(t,n,o,e=>`.${o.e(o.h(t))}${e}`)]=e[n];return r}function i(t,o,{e,h:r},i){return o.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(o,n=" ",l=o,a="")=>i(`${n}:where(${l}):not(:where(.${e(r("not-"+t))} *))${a}`))}function n(t){return t?"string"==typeof t?{fontSize:t}:{fontSize:t[0],..."string"==typeof t[1]?{lineHeight:t[1]}:t[1]}:void 0}function l(t,o){return`${(t/o).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}export{e as default};//# sourceMappingURL=preset-typography.browser.js.map |
import { BaseTheme, CSSNested, Preset } from 'twind'; | ||
/** | ||
* [[include:packages/preset-typography/README.md]] | ||
* | ||
* @packageDocumentation | ||
* @module | ||
*/ | ||
declare module 'twind' { | ||
@@ -11,0 +4,0 @@ interface CustomProperties { |
@@ -65,9 +65,5 @@ import { withAutocomplete, toColorValue } from 'twind'; | ||
'headings', | ||
'h1,h2,h3,h4,th' | ||
'h1,h2,h3,h4,h5,h6,th' | ||
], | ||
[ | ||
'lead', | ||
'.lead' | ||
], | ||
[ | ||
'h1' | ||
@@ -85,2 +81,8 @@ ], | ||
[ | ||
'h5' | ||
], | ||
[ | ||
'h6' | ||
], | ||
[ | ||
'p' | ||
@@ -144,2 +146,6 @@ ], | ||
'hr' | ||
], | ||
[ | ||
'lead', | ||
'.lead' | ||
] | ||
@@ -297,2 +303,5 @@ ].map(([name, selector = name])=>[ | ||
}, | ||
'a strong,blockquote strong,thead th strong': { | ||
color: 'inherit' | ||
}, | ||
ul: { | ||
@@ -400,3 +409,4 @@ listStyleType: 'disc' | ||
'h1 strong': { | ||
fontWeight: '900' | ||
fontWeight: '900', | ||
color: 'inherit' | ||
}, | ||
@@ -412,3 +422,4 @@ h2: { | ||
'h2 strong': { | ||
fontWeight: '800' | ||
fontWeight: '800', | ||
color: 'inherit' | ||
}, | ||
@@ -424,3 +435,4 @@ h3: { | ||
'h3 strong': { | ||
fontWeight: '700' | ||
fontWeight: '700', | ||
color: 'inherit' | ||
}, | ||
@@ -435,3 +447,4 @@ h4: { | ||
'h4 strong': { | ||
fontWeight: '700' | ||
fontWeight: '700', | ||
color: 'inherit' | ||
}, | ||
@@ -469,4 +482,4 @@ 'hr+*,h2+*,h3+*,h4+*': { | ||
}, | ||
'a code': { | ||
color: 'var(--tw-prose-links)' | ||
'a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code': { | ||
color: 'inherit' | ||
}, | ||
@@ -539,3 +552,3 @@ pre: { | ||
}, | ||
'tbody td': { | ||
'tbody td,tfoot td': { | ||
verticalAlign: 'baseline', | ||
@@ -547,6 +560,6 @@ paddingTop: em(8, 14), | ||
}, | ||
'tbody td:first-child': { | ||
'tbody td:first-child,tfoot td:first-child': { | ||
paddingLeft: '0' | ||
}, | ||
'tbody td:last-child': { | ||
'tbody td:last-child,tfoot td:last-child': { | ||
paddingRight: '0' | ||
@@ -553,0 +566,0 @@ }, |
@@ -65,9 +65,5 @@ import { withAutocomplete, toColorValue } from 'twind'; | ||
'headings', | ||
'h1,h2,h3,h4,th' | ||
'h1,h2,h3,h4,h5,h6,th' | ||
], | ||
[ | ||
'lead', | ||
'.lead' | ||
], | ||
[ | ||
'h1' | ||
@@ -85,2 +81,8 @@ ], | ||
[ | ||
'h5' | ||
], | ||
[ | ||
'h6' | ||
], | ||
[ | ||
'p' | ||
@@ -144,2 +146,6 @@ ], | ||
'hr' | ||
], | ||
[ | ||
'lead', | ||
'.lead' | ||
] | ||
@@ -297,2 +303,5 @@ ].map(([name, selector = name])=>[ | ||
}, | ||
'a strong,blockquote strong,thead th strong': { | ||
color: 'inherit' | ||
}, | ||
ul: { | ||
@@ -400,3 +409,4 @@ listStyleType: 'disc' | ||
'h1 strong': { | ||
fontWeight: '900' | ||
fontWeight: '900', | ||
color: 'inherit' | ||
}, | ||
@@ -412,3 +422,4 @@ h2: { | ||
'h2 strong': { | ||
fontWeight: '800' | ||
fontWeight: '800', | ||
color: 'inherit' | ||
}, | ||
@@ -424,3 +435,4 @@ h3: { | ||
'h3 strong': { | ||
fontWeight: '700' | ||
fontWeight: '700', | ||
color: 'inherit' | ||
}, | ||
@@ -435,3 +447,4 @@ h4: { | ||
'h4 strong': { | ||
fontWeight: '700' | ||
fontWeight: '700', | ||
color: 'inherit' | ||
}, | ||
@@ -469,4 +482,4 @@ 'hr+*,h2+*,h3+*,h4+*': { | ||
}, | ||
'a code': { | ||
color: 'var(--tw-prose-links)' | ||
'a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code': { | ||
color: 'inherit' | ||
}, | ||
@@ -539,3 +552,3 @@ pre: { | ||
}, | ||
'tbody td': { | ||
'tbody td,tfoot td': { | ||
verticalAlign: 'baseline', | ||
@@ -547,6 +560,6 @@ paddingTop: em(8, 14), | ||
}, | ||
'tbody td:first-child': { | ||
'tbody td:first-child,tfoot td:first-child': { | ||
paddingLeft: '0' | ||
}, | ||
'tbody td:last-child': { | ||
'tbody td:last-child,tfoot td:last-child': { | ||
paddingRight: '0' | ||
@@ -553,0 +566,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
this.twind=this.twind||{},this.twind.presetTypography=function(t){"use strict";function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t}).apply(this,arguments)}function o(){return e.apply(this,arguments)}function r(e,o){return t.withAutocomplete(e,o)}function i(t,e,o){let r={};for(let i in o)r[n(t,i,e,o=>`.${e.e(e.h(t))}${o}`)]=o[i];return r}function n(t,e,{e:o,h:r},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(e,n=" ",l=e,a="")=>i(`${n}:where(${l}):not(:where(.${o(r("not-"+t))} *))${a}`))}function l(t){return t?"string"==typeof t?{fontSize:t}:o({fontSize:t[0]},"string"==typeof t[1]?{lineHeight:t[1]}:t[1]):void 0}function a(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}return function({className:e="prose",defaultColor:p="gray",extend:d={},colors:s={}}={}){return s=o({body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200"},s,{dark:null===s.dark?null:o({body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700"},s.dark)}),{variants:[["headings","h1,h2,h3,h4,th"],["lead",".lead"],["h1"],["h2"],["h3"],["h4"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"]].map(([t,o=t])=>[`${e}-${t}`,(t,r)=>n(e,"."==o[0]?"."+r.e(r.h(o.slice(1))):o,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${e})`,({1:t},{h:e})=>[{c:e(t)}]],[`${e}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[e+"-",r(({$$:t},e)=>{let o=l(e.theme("fontSize",t));return o&&{"@layer components":o}},(t,{theme:e})=>Object.keys(e("fontSize")))],[e+"-",r(({$$:t},e)=>h(t,e),(t,{theme:e})=>Object.keys(e("colors")).filter(t=>t&&"DEFAULT"!=t&&!/[.-]/.test(t)))],[e,(t,r)=>o({},h(p,r),{"@layer base":[i(e,r,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:a(20,16),marginBottom:a(20,16),paddingLeft:a(26,16)},li:{marginTop:a(8,16),marginBottom:a(8,16)},"ol>li,ul>li":{paddingLeft:a(6,16)},">ul>li p":{marginTop:a(12,16),marginBottom:a(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:a(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:a(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:a(12,16),marginBottom:a(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:a(48,16),marginBottom:a(48,16)},blockquote:{marginTop:a(32,20),marginBottom:a(32,20),paddingLeft:a(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:a(20,16),marginBottom:a(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:a(36,16),marginTop:"0",marginBottom:a(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:a(24,16),marginTop:a(48,24),marginBottom:a(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:a(20,16),marginTop:a(32,20),marginBottom:a(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:a(24,16),marginBottom:a(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:a(32,16),marginBottom:a(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:a(14,16),lineHeight:"1.4",marginTop:a(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:a(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:a(21,24)},"h3 code":{fontSize:a(18,20)},"a code":{color:"var(--tw-prose-links)"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:a(14,16),lineHeight:"1.7",marginTop:a(24,14),marginBottom:a(24,14),borderRadius:"0.375rem",paddingTop:a(12,14),paddingRight:a(16,14),paddingBottom:a(12,14),paddingLeft:a(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:a(32,16),marginBottom:a(32,16),fontSize:a(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td":{verticalAlign:"baseline",paddingTop:a(8,14),paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"tbody td:first-child":{paddingLeft:"0"},"tbody td:last-child":{paddingRight:"0"},[`.${r.e(r.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:a(20,16),lineHeight:"1.6",marginTop:a(24,20),marginBottom:a(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),i(e,r,d)],"@layer components":o({},l(r.theme("fontSize","base")),{color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"})})]]};function h(e,o){let r={},i={},n=(r,n,l)=>{let a=o.theme(`colors.${e}.${n}`,n);l["--tw-prose-"+r]=t.toColorValue(a);let p=l!=i&&o.d("colors",`${e}.${n}`,a);p&&(i["--tw-prose-"+r]=t.toColorValue(p))};for(let l in s){let a=s[l];"dark"!=l&&a&&n(l,a,r)}for(let p in s.dark||{}){let d=s.dark[p];d&&(s.dark?n("invert-"+p,d,r):n(p,d,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[o.v("dark")]:i}}:void 0}}}(twind);//# sourceMappingURL=preset-typography.global.dev.js.map | ||
this.twind=this.twind||{},this.twind.presetTypography=function(t){"use strict";function o(){return(o=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function e(){return o.apply(this,arguments)}function r(o,e){return t.withAutocomplete(o,e)}function i(t,o,e){let r={};for(let i in e)r[n(t,i,o,e=>`.${o.e(o.h(t))}${e}`)]=e[i];return r}function n(t,o,{e,h:r},i){return o.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(o,n=" ",l=o,a="")=>i(`${n}:where(${l}):not(:where(.${e(r("not-"+t))} *))${a}`))}function l(t){return t?"string"==typeof t?{fontSize:t}:e({fontSize:t[0]},"string"==typeof t[1]?{lineHeight:t[1]}:t[1]):void 0}function a(t,o){return`${(t/o).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}return function({className:o="prose",defaultColor:d="gray",extend:s={},colors:p={}}={}){return p=e({body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200"},p,{dark:null===p.dark?null:e({body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700"},p.dark)}),{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([t,e=t])=>[`${o}-${t}`,(t,r)=>n(o,"."==e[0]?"."+r.e(r.h(e.slice(1))):e,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${o})`,({1:t},{h:o})=>[{c:o(t)}]],[`${o}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[o+"-",r(({$$:t},o)=>{let e=l(o.theme("fontSize",t));return e&&{"@layer components":e}},(t,{theme:o})=>Object.keys(o("fontSize")))],[o+"-",r(({$$:t},o)=>h(t,o),(t,{theme:o})=>Object.keys(o("colors")).filter(t=>t&&"DEFAULT"!=t&&!/[.-]/.test(t)))],[o,(t,r)=>e({},h(d,r),{"@layer base":[i(o,r,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:a(20,16),marginBottom:a(20,16),paddingLeft:a(26,16)},li:{marginTop:a(8,16),marginBottom:a(8,16)},"ol>li,ul>li":{paddingLeft:a(6,16)},">ul>li p":{marginTop:a(12,16),marginBottom:a(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:a(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:a(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:a(12,16),marginBottom:a(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:a(48,16),marginBottom:a(48,16)},blockquote:{marginTop:a(32,20),marginBottom:a(32,20),paddingLeft:a(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:a(20,16),marginBottom:a(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:a(36,16),marginTop:"0",marginBottom:a(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:a(24,16),marginTop:a(48,24),marginBottom:a(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:a(20,16),marginTop:a(32,20),marginBottom:a(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:a(24,16),marginBottom:a(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:a(32,16),marginBottom:a(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:a(14,16),lineHeight:"1.4",marginTop:a(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:a(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:a(21,24)},"h3 code":{fontSize:a(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:a(14,16),lineHeight:"1.7",marginTop:a(24,14),marginBottom:a(24,14),borderRadius:"0.375rem",paddingTop:a(12,14),paddingRight:a(16,14),paddingBottom:a(12,14),paddingLeft:a(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:a(32,16),marginBottom:a(32,16),fontSize:a(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:a(8,14),paddingRight:a(8,14),paddingBottom:a(8,14),paddingLeft:a(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${r.e(r.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:a(20,16),lineHeight:"1.6",marginTop:a(24,20),marginBottom:a(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),i(o,r,s)],"@layer components":e({},l(r.theme("fontSize","base")),{color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"})})]]};function h(o,e){let r={},i={},n=(r,n,l)=>{let a=e.theme(`colors.${o}.${n}`,n);l["--tw-prose-"+r]=t.toColorValue(a);let d=l!=i&&e.d("colors",`${o}.${n}`,a);d&&(i["--tw-prose-"+r]=t.toColorValue(d))};for(let l in p){let a=p[l];"dark"!=l&&a&&n(l,a,r)}for(let d in p.dark||{}){let s=p.dark[d];s&&(p.dark?n("invert-"+d,s,r):n(d,s,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[e.v("dark")]:i}}:void 0}}}(twind);//# sourceMappingURL=preset-typography.global.dev.js.map |
@@ -1,1 +0,1 @@ | ||
this.twind=this.twind||{},this.twind.presetTypography=function(t){"use strict";function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t}).apply(this,arguments)}function o(){return e.apply(this,arguments)}function r(t,e,o){let r={};for(let n in o)r[i(t,n,e,o=>`.${e.e(e.h(t))}${o}`)]=o[n];return r}function i(t,e,{e:o,h:r},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(e,n=" ",l=e,a="")=>i(`${n}:where(${l}):not(:where(.${o(r("not-"+t))} *))${a}`))}function n(t){return t?"string"==typeof t?{fontSize:t}:o({fontSize:t[0]},"string"==typeof t[1]?{lineHeight:t[1]}:t[1]):void 0}function l(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}return function({className:e="prose",defaultColor:a="gray",extend:p={},colors:d={}}={}){return d=o({body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200"},d,{dark:null===d.dark?null:o({body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700"},d.dark)}),{variants:[["headings","h1,h2,h3,h4,th"],["lead",".lead"],["h1"],["h2"],["h3"],["h4"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"]].map(([t,o=t])=>[`${e}-${t}`,(t,r)=>i(e,"."==o[0]?"."+r.e(r.h(o.slice(1))):o,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${e})`,({1:t},{h:e})=>[{c:e(t)}]],[`${e}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[e+"-",({$$:t},e)=>{let o=n(e.theme("fontSize",t));return o&&{"@layer components":o}}],[e+"-",({$$:t},e)=>s(t,e)],[e,(t,i)=>o({},s(a,i),{"@layer base":[r(e,i,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:l(20,16),marginBottom:l(20,16),paddingLeft:l(26,16)},li:{marginTop:l(8,16),marginBottom:l(8,16)},"ol>li,ul>li":{paddingLeft:l(6,16)},">ul>li p":{marginTop:l(12,16),marginBottom:l(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:l(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:l(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:l(12,16),marginBottom:l(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:l(48,16),marginBottom:l(48,16)},blockquote:{marginTop:l(32,20),marginBottom:l(32,20),paddingLeft:l(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:l(20,16),marginBottom:l(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:l(36,16),marginTop:"0",marginBottom:l(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:l(24,16),marginTop:l(48,24),marginBottom:l(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:l(20,16),marginTop:l(32,20),marginBottom:l(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:l(24,16),marginBottom:l(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:l(32,16),marginBottom:l(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:l(14,16),lineHeight:"1.4",marginTop:l(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:l(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:l(21,24)},"h3 code":{fontSize:l(18,20)},"a code":{color:"var(--tw-prose-links)"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:l(14,16),lineHeight:"1.7",marginTop:l(24,14),marginBottom:l(24,14),borderRadius:"0.375rem",paddingTop:l(12,14),paddingRight:l(16,14),paddingBottom:l(12,14),paddingLeft:l(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:l(32,16),marginBottom:l(32,16),fontSize:l(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td":{verticalAlign:"baseline",paddingTop:l(8,14),paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"tbody td:first-child":{paddingLeft:"0"},"tbody td:last-child":{paddingRight:"0"},[`.${i.e(i.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:l(20,16),lineHeight:"1.6",marginTop:l(24,20),marginBottom:l(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),r(e,i,p)],"@layer components":o({},n(i.theme("fontSize","base")),{color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"})})]]};function s(e,o){let r={},i={},n=(r,n,l)=>{let a=o.theme(`colors.${e}.${n}`,n);l["--tw-prose-"+r]=t.toColorValue(a);let p=l!=i&&o.d("colors",`${e}.${n}`,a);p&&(i["--tw-prose-"+r]=t.toColorValue(p))};for(let l in d){let a=d[l];"dark"!=l&&a&&n(l,a,r)}for(let p in d.dark||{}){let s=d.dark[p];s&&(d.dark?n("invert-"+p,s,r):n(p,s,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[o.v("dark")]:i}}:void 0}}}(twind);//# sourceMappingURL=preset-typography.global.js.map | ||
this.twind=this.twind||{},this.twind.presetTypography=function(t){"use strict";function o(){return(o=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function e(){return o.apply(this,arguments)}function r(t,o,e){let r={};for(let n in e)r[i(t,n,o,e=>`.${o.e(o.h(t))}${e}`)]=e[n];return r}function i(t,o,{e,h:r},i){return o.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(o,n=" ",l=o,a="")=>i(`${n}:where(${l}):not(:where(.${e(r("not-"+t))} *))${a}`))}function n(t){return t?"string"==typeof t?{fontSize:t}:e({fontSize:t[0]},"string"==typeof t[1]?{lineHeight:t[1]}:t[1]):void 0}function l(t,o){return`${(t/o).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}return function({className:o="prose",defaultColor:a="gray",extend:d={},colors:p={}}={}){return p=e({body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200"},p,{dark:null===p.dark?null:e({body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700"},p.dark)}),{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([t,e=t])=>[`${o}-${t}`,(t,r)=>i(o,"."==e[0]?"."+r.e(r.h(e.slice(1))):e,r,t=>`& :is(${t.trim()})`)]),rules:[[`(lead|not-${o})`,({1:t},{h:o})=>[{c:o(t)}]],[`${o}-invert`,{"@layer defaults":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[o+"-",({$$:t},o)=>{let e=n(o.theme("fontSize",t));return e&&{"@layer components":e}}],[o+"-",({$$:t},o)=>s(t,o)],[o,(t,i)=>e({},s(a,i),{"@layer base":[r(o,i,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:l(20,16),marginBottom:l(20,16),paddingLeft:l(26,16)},li:{marginTop:l(8,16),marginBottom:l(8,16)},"ol>li,ul>li":{paddingLeft:l(6,16)},">ul>li p":{marginTop:l(12,16),marginBottom:l(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:l(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:l(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:l(12,16),marginBottom:l(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:l(48,16),marginBottom:l(48,16)},blockquote:{marginTop:l(32,20),marginBottom:l(32,20),paddingLeft:l(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:l(20,16),marginBottom:l(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:l(36,16),marginTop:"0",marginBottom:l(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:l(24,16),marginTop:l(48,24),marginBottom:l(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:l(20,16),marginTop:l(32,20),marginBottom:l(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:l(24,16),marginBottom:l(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:l(32,16),marginBottom:l(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:l(14,16),lineHeight:"1.4",marginTop:l(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:l(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:l(21,24)},"h3 code":{fontSize:l(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:l(14,16),lineHeight:"1.7",marginTop:l(24,14),marginBottom:l(24,14),borderRadius:"0.375rem",paddingTop:l(12,14),paddingRight:l(16,14),paddingBottom:l(12,14),paddingLeft:l(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:l(32,16),marginBottom:l(32,16),fontSize:l(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:l(8,14),paddingRight:l(8,14),paddingBottom:l(8,14),paddingLeft:l(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${i.e(i.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:l(20,16),lineHeight:"1.6",marginTop:l(24,20),marginBottom:l(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),r(o,i,d)],"@layer components":e({},n(i.theme("fontSize","base")),{color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"})})]]};function s(o,e){let r={},i={},n=(r,n,l)=>{let a=e.theme(`colors.${o}.${n}`,n);l["--tw-prose-"+r]=t.toColorValue(a);let d=l!=i&&e.d("colors",`${o}.${n}`,a);d&&(i["--tw-prose-"+r]=t.toColorValue(d))};for(let l in p){let a=p[l];"dark"!=l&&a&&n(l,a,r)}for(let d in p.dark||{}){let s=p.dark[d];s&&(p.dark?n("invert-"+d,s,r):n(d,s,i))}return Object.keys(r).length?{"@layer defaults":{"&":r,[e.v("dark")]:i}}:void 0}}}(twind);//# sourceMappingURL=preset-typography.global.js.map |
@@ -147,9 +147,5 @@ import { toColorValue } from 'twind'; | ||
'headings', | ||
'h1,h2,h3,h4,th' | ||
'h1,h2,h3,h4,h5,h6,th' | ||
], | ||
[ | ||
'lead', | ||
'.lead' | ||
], | ||
[ | ||
'h1' | ||
@@ -167,2 +163,8 @@ ], | ||
[ | ||
'h5' | ||
], | ||
[ | ||
'h6' | ||
], | ||
[ | ||
'p' | ||
@@ -226,2 +228,6 @@ ], | ||
'hr' | ||
], | ||
[ | ||
'lead', | ||
'.lead' | ||
] | ||
@@ -297,2 +303,5 @@ ].map(([name, selector = name])=>[ | ||
}, | ||
'a strong,blockquote strong,thead th strong': { | ||
color: 'inherit' | ||
}, | ||
ul: { | ||
@@ -400,3 +409,4 @@ listStyleType: 'disc' | ||
'h1 strong': { | ||
fontWeight: '900' | ||
fontWeight: '900', | ||
color: 'inherit' | ||
}, | ||
@@ -412,3 +422,4 @@ h2: { | ||
'h2 strong': { | ||
fontWeight: '800' | ||
fontWeight: '800', | ||
color: 'inherit' | ||
}, | ||
@@ -424,3 +435,4 @@ h3: { | ||
'h3 strong': { | ||
fontWeight: '700' | ||
fontWeight: '700', | ||
color: 'inherit' | ||
}, | ||
@@ -435,3 +447,4 @@ h4: { | ||
'h4 strong': { | ||
fontWeight: '700' | ||
fontWeight: '700', | ||
color: 'inherit' | ||
}, | ||
@@ -469,4 +482,4 @@ 'hr+*,h2+*,h3+*,h4+*': { | ||
}, | ||
'a code': { | ||
color: 'var(--tw-prose-links)' | ||
'a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code': { | ||
color: 'inherit' | ||
}, | ||
@@ -539,3 +552,3 @@ pre: { | ||
}, | ||
'tbody td': { | ||
'tbody td,tfoot td': { | ||
verticalAlign: 'baseline', | ||
@@ -547,6 +560,6 @@ paddingTop: em(8, 14), | ||
}, | ||
'tbody td:first-child': { | ||
'tbody td:first-child,tfoot td:first-child': { | ||
paddingLeft: '0' | ||
}, | ||
'tbody td:last-child': { | ||
'tbody td:last-child,tfoot td:last-child': { | ||
paddingRight: '0' | ||
@@ -553,0 +566,0 @@ }, |
# @twind/preset-typography [![MIT License](https://flat.badgen.net/github/license/tw-in-js/twind)](https://github.com/tw-in-js/twind/blob/next/LICENSE) [![Latest Release](https://flat.badgen.net/npm/v/@twind/preset-typography/next?icon=npm&label&cache=10800&color=blue)](https://www.npmjs.com/package/@twind/preset-typography/v/next) [![Github](https://flat.badgen.net/badge/icon/tw-in-js%2Ftwind%23preset-typography?icon=github&label)](https://github.com/tw-in-js/twind/tree/next/packages/preset-typography) | ||
--- | ||
> Based on [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography). | ||
## READ THIS FIRST! | ||
**Twind v1 is still in beta. Expect bugs!** | ||
--- | ||
A plugin that provides a set of `prose` classes you can use to add beautiful typographic defaults to any vanilla HTML you don't control, like HTML rendered from Markdown, or pulled from a CMS. | ||
> Based on [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography). | ||
- 📖 Study [the documentation](https://twind.style/preset-typography) | ||
- 🤖 Try [the playground](https://twind.run/preset-typography) | ||
- 🧭 Explore [the examples](https://twind.style/examples) | ||
- 📓 Consult [the API reference](https://twind.style/packages/@twind/preset-typography) | ||
- 📜 Read [the changelog](https://github.com/tw-in-js/twind/tree/next/packages/preset-typography/CHANGELOG.md) | ||
## Installation | ||
## 📖 Documentation | ||
Install from npm: | ||
The full documentation is available at [twind.style/preset-typography](https://twind.style/preset-typography). | ||
```sh | ||
npm install twind@next @twind/preset-typography@next | ||
``` | ||
## 💬 Community | ||
## Installation | ||
For help, discussion about best practices, or any other conversation that would benefit from being searchable use [Github Discussions](https://github.com/tw-in-js/twind/discussions). | ||
**with [twind](https://github.com/tw-in-js/twind/tree/next/packages/twind)** | ||
To ask questions and discuss with other Twind users in real time use [Discord Chat](https://chat.twind.style). | ||
```js | ||
import { setup } from 'twind' | ||
import presetTypography from '@twind/preset-typography' | ||
## 🧱 Contribute | ||
setup({ | ||
presets: [presetTypography(/* options */)], | ||
/* config */ | ||
}) | ||
``` | ||
See the [Contributing Guide](../../CONTRIBUTING.md) for information on how to contribute to this project. | ||
<details><summary>Usage with a script tag</summary> | ||
## 📜 Changelog | ||
```html | ||
<head> | ||
<script | ||
src="https://cdn.jsdelivr.net/combine/npm/twind@next,npm/@twind/preset-typography@next" | ||
crossorigin | ||
></script> | ||
<script> | ||
twind.setup({ | ||
presets: [twind.presetTypography(/* options */)], | ||
/* config */ | ||
}) | ||
</script> | ||
</head> | ||
``` | ||
The Changelog for this package is [available on GitHub](https://github.com/tw-in-js/twind/tree/next/packages/preset-typography/CHANGELOG.md). | ||
</details> | ||
## ⚖️ License | ||
**with [Twind CDN](https://github.com/tw-in-js/twind/tree/next/packages/cdn)** — a drop-in replacement for [Tailwind CSS Play CDN](https://tailwindcss.com/docs/installation/play-cdn) | ||
```html | ||
<head> | ||
<script | ||
src="https://cdn.jsdelivr.net/combine/npm/@twind/cdn@next,npm/@twind/preset-typography@next" | ||
crossorigin | ||
></script> | ||
<script> | ||
twind.setup({ | ||
presets: [twind.presetTypography(/* options */)], | ||
/* config */ | ||
}) | ||
</script> | ||
</head> | ||
``` | ||
## Usage | ||
TBD | ||
Most features of the [Tailwind CSSS › typography-plugin](https://tailwindcss.com/docs/typography-plugin) are implemented in the same way. | ||
## Differences | ||
- _Adding custom color themes_: every color from `theme.colors` is available via `prose-<color>`; the default color `gray` can be changed via `presetTypography({ defaultColor: '...'})` | ||
- _Customizing the CSS_: can be done using `presetTypography({ extend: { /* CSS object */ } })` | ||
The [MIT license](https://github.com/tw-in-js/twind/blob/main/LICENSE) governs your use of Twind. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
471321
3492
34
+ Addedtwind@0.0.0-next-20221114103805(transitive)
- Removedtwind@0.0.0-canary-3f42963d(transitive)
Updated@swc/helpers@^0.4.11