@prop-styles/core
Advanced tools
Comparing version 0.0.3 to 0.0.4
/*! | ||
* @zx-libs/utils version 0.0.1 | ||
* @prop-styles/core version 0.0.4 | ||
* Author: Capricorncd<capricorncd@qq.com> | ||
* Homepage: https://github.com/capricorncd/prop-styles#readme | ||
* Released on: 2024-04-25 23:05:37 (GMT+0900) | ||
*/ | ||
/*! | ||
* @zx-libs/utils version 0.0.4 | ||
* Author: Capricorncd<capricorncd@qq.com> | ||
* Homepage: https://github.com/capricorncd/zx-libs/libs/utils#readme | ||
* Released on: 2024-04-21 17:05:23 (GMT+0900) | ||
* Released on: 2024-04-24 23:27:26 (GMT+0900) | ||
*/ | ||
function u(n) { | ||
return typeof n == "string" ? /^-?\d+(\.\d+)?$/.test(n) : a(n); | ||
/*! | ||
* date-utils-2020 v1.1.1 | ||
* Author: Capricorncd | ||
* Repository: https://github.com/capricorncd/date-utils-2020#readme | ||
* Released on: 2024/04/02 21:28:40 GMT+0900 | ||
*/ | ||
function f(n) { | ||
return typeof n == "string" ? /^-?\d+(\.\d+)?$/.test(n) : c(n); | ||
} | ||
function a(n) { | ||
function c(n) { | ||
return Number.isFinite(n); | ||
} | ||
function d(n) { | ||
function p(n) { | ||
return typeof n > "u" || n === null; | ||
} | ||
function e(n, r = "px") { | ||
if (u(n)) | ||
return `${n}${r}`; | ||
const m = /^((-?\d+(\.\d+)?)?([a-z]+|%)?\s*)+$/i, h = /(\d+\s|\s\d+$)/; | ||
function o(n, t = "px") { | ||
if (f(n)) | ||
return `${n}${t}`; | ||
if (n && typeof n == "string") { | ||
const t = n.trim().replace(/\s{2,}/g, " "); | ||
return /^(-?\d+(\.\d+)?([a-z]+|%)?\s*)+$/i.test(t) && /(\d+\s|\s\d+$)/.test(t) ? t.trim().split(" ").map((i) => e(i, r)).join(" ") : t; | ||
const i = n.trim().replace(/\s{2,}/g, " "); | ||
return m.test(i) && h.test(i) ? i.trim().split(" ").map((e) => o(e, t)).join(" ") : i; | ||
} | ||
return ""; | ||
} | ||
function p(n = "", r = "-") { | ||
function b(n = "", t = "-") { | ||
return n.replace( | ||
/[A-Z]/g, | ||
(t, i) => `${i > 0 ? r : ""}${t.toLowerCase()}` | ||
(i, e) => `${e > 0 ? t : ""}${i.toLowerCase()}` | ||
); | ||
} | ||
function h(n) { | ||
function y(n) { | ||
return typeof n == "boolean"; | ||
} | ||
const m = /^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i; | ||
function b(n) { | ||
return typeof n != "string" ? !1 : m.test(n); | ||
const R = /^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i; | ||
function k(n) { | ||
return typeof n != "string" ? !1 : R.test(n); | ||
} | ||
function o(n, r, t) { | ||
return !r && r !== 0 ? null : [n, t ?? String(r)]; | ||
function r(n, t, i) { | ||
return !t && t !== 0 ? null : [n, i ?? String(t)]; | ||
} | ||
function f(n, r) { | ||
return n.reduce((t, i) => (t[i] = (l) => r(i, l), t), {}); | ||
function g(n, t) { | ||
return n.reduce((i, e) => (i[e] = (a) => t(e, a), i), {}); | ||
} | ||
function y(n) { | ||
return f( | ||
function S(n) { | ||
return g( | ||
n, | ||
(r, t) => o("display", t, p(r)) | ||
(t, i) => r("display", i, b(t)) | ||
); | ||
} | ||
function S(n) { | ||
return f( | ||
function C(n) { | ||
return g( | ||
n, | ||
(r, t) => o(r, t, e(t)) | ||
(t, i) => r(t, i, o(i)) | ||
); | ||
} | ||
function k(n) { | ||
return f(n, (r, t) => [r, t]); | ||
function w(n) { | ||
return g(n, (t, i) => [t, i]); | ||
} | ||
const P = /^-?\d+(\.\d+)?[a-z]+$/i; | ||
function R(n) { | ||
return typeof n == "string" && P.test(n); | ||
const x = /^-?\d+(\.\d+)?[a-z]+$/i; | ||
function B(n) { | ||
return typeof n == "string" && x.test(n); | ||
} | ||
function W(n) { | ||
return d(n) ? null : u(n) || R(n) ? ["borderWidth", e(n)] : b(n) ? ["borderColor", n] : ["border", String(n)]; | ||
function I(n) { | ||
return p(n) ? null : f(n) || B(n) ? ["borderWidth", o(n)] : k(n) ? ["borderColor", n] : ["border", String(n)]; | ||
} | ||
function _(n, r, t) { | ||
let i; | ||
for (const l of Object.keys(n)) | ||
if (i = r[l], i) { | ||
const s = i(n[l], n); | ||
function L(n, t, i) { | ||
let e; | ||
for (const a of Object.keys(n)) | ||
if (e = t[a], e) { | ||
const s = e(n[a], n); | ||
if (s) { | ||
const [c, g] = s; | ||
t[c] = g; | ||
const [d, u] = s; | ||
i[d] = u; | ||
} | ||
} | ||
} | ||
const w = [ | ||
const P = { | ||
p: "padding", | ||
pt: "paddingTop", | ||
pb: "paddingBottom", | ||
pl: "paddingLeft", | ||
pr: "paddingRight", | ||
px: "paddingInline", | ||
py: "paddingBlock", | ||
m: "margin", | ||
mt: "marginTop", | ||
mb: "marginBottom", | ||
ml: "marginLeft", | ||
mr: "marginRight", | ||
mx: "marginInline", | ||
my: "marginBlock", | ||
fs: "fontSize", | ||
lh: "lineHeight", | ||
bg: "background", | ||
fw: "fontWeight" | ||
}, W = [ | ||
"width", | ||
@@ -101,3 +133,3 @@ "minWidth", | ||
"lineHeight" | ||
], C = ["background", "color"], $ = [ | ||
], _ = ["background", "color"], $ = [ | ||
"flex", | ||
@@ -108,40 +140,43 @@ "grid", | ||
"inlineBlock" | ||
], E = { | ||
radius: (n) => ["borderRadius", e(n)], | ||
align: (n) => ["alignItems", n ?? ""], | ||
justify: (n) => ["justifyContent", n ?? ""], | ||
column: (n) => n ? ["flexDirection", "column"] : null, | ||
wrap: (n) => n ? ["flexWrap", h(n) ? "wrap" : n] : null, | ||
breakWord: (n) => n ? ["overflowWrap", "break-word"] : null, | ||
], l = { | ||
radius: (n) => r("borderRadius", n, o(n)), | ||
align: (n) => r("alignItems", n), | ||
alignContent: (n) => r("alignContent", n), | ||
justify: (n) => r("justifyContent", n), | ||
justifyItems: (n) => r("justifyItems", n), | ||
column: (n) => r("flexDirection", n, "column"), | ||
wrap: (n) => n ? ["flexWrap", y(n) ? "wrap" : n] : null, | ||
breakWord: (n) => r("overflowWrap", n, "break-word"), | ||
// font | ||
bold: (n) => n ? ["fontWeight", "bold"] : null, | ||
thin: (n) => n ? ["fontWeight", "500"] : null, | ||
bold: (n) => r("fontWeight", n, "bold"), | ||
thin: (n) => r("fontWeight", n, "500"), | ||
// display | ||
...y($), | ||
...S($), | ||
// overflow | ||
scroll: (n) => n ? [ | ||
`overflow${typeof n == "string" ? n.toUpperCase() : ""}`, | ||
"auto" | ||
] : null, | ||
...S(w), | ||
...k(C), | ||
scroll: (n) => n ? [`overflow${typeof n == "string" ? n.toUpperCase() : ""}`, "auto"] : null, | ||
...C(W), | ||
...w(_), | ||
// border | ||
border: (n) => W(n), | ||
fs: (n) => o("fontSize", n, e(n)), | ||
bg: (n) => o("background", n), | ||
fontWeight: (n) => o("fontWeight", n), | ||
fw: (n) => o("fontWeight", n) | ||
border: (n) => I(n), | ||
fontWeight: (n) => r("fontWeight", n), | ||
tempColumns: (n) => r("gridTemplateColumns", o(n, "fr")), | ||
tempRows: (n) => r("gridTemplateRows", o(n, "fr")) | ||
}; | ||
function L(n, r) { | ||
const t = { | ||
for (const [n, t] of Object.entries(P)) | ||
if (l[t]) | ||
l[n] = l[t]; | ||
else | ||
throw new Error(`The alias of ${n} does not exist`); | ||
function E(n, t) { | ||
const i = { | ||
...n.style | ||
}, i = { | ||
...E, | ||
...r | ||
}, e = { | ||
...l, | ||
...t | ||
}; | ||
return _(n, i, t), t; | ||
return L(n, e, i), i; | ||
} | ||
export { | ||
L as createPropStyles, | ||
o as formatReturn | ||
E as createPropStyles, | ||
r as formatReturn | ||
}; |
@@ -1,6 +0,17 @@ | ||
(function(r,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(r=typeof globalThis<"u"?globalThis:r||self,f(r["prop-styles-core"]={}))})(this,function(r){"use strict";/*! | ||
* @zx-libs/utils version 0.0.1 | ||
/*! | ||
* @prop-styles/core version 0.0.4 | ||
* Author: Capricorncd<capricorncd@qq.com> | ||
* Homepage: https://github.com/capricorncd/prop-styles#readme | ||
* Released on: 2024-04-25 23:05:37 (GMT+0900) | ||
*/ | ||
(function(o,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(o=typeof globalThis<"u"?globalThis:o||self,s(o["prop-styles-core"]={}))})(this,function(o){"use strict";/*! | ||
* @zx-libs/utils version 0.0.4 | ||
* Author: Capricorncd<capricorncd@qq.com> | ||
* Homepage: https://github.com/capricorncd/zx-libs/libs/utils#readme | ||
* Released on: 2024-04-21 17:05:23 (GMT+0900) | ||
*/function f(n){return typeof n=="string"?/^-?\d+(\.\d+)?$/.test(n):c(n)}function c(n){return Number.isFinite(n)}function g(n){return typeof n>"u"||n===null}function l(n,i="px"){if(f(n))return`${n}${i}`;if(n&&typeof n=="string"){const t=n.trim().replace(/\s{2,}/g," ");return/^(-?\d+(\.\d+)?([a-z]+|%)?\s*)+$/i.test(t)&&/(\d+\s|\s\d+$)/.test(t)?t.trim().split(" ").map(e=>l(e,i)).join(" "):t}return""}function a(n="",i="-"){return n.replace(/[A-Z]/g,(t,e)=>`${e>0?i:""}${t.toLowerCase()}`)}function p(n){return typeof n=="boolean"}const m=/^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i;function h(n){return typeof n!="string"?!1:m.test(n)}function o(n,i,t){return!i&&i!==0?null:[n,t??String(i)]}function u(n,i){return n.reduce((t,e)=>(t[e]=s=>i(e,s),t),{})}function b(n){return u(n,(i,t)=>o("display",t,a(i)))}function y(n){return u(n,(i,t)=>o(i,t,l(t)))}function S(n){return u(n,(i,t)=>[i,t])}const P=/^-?\d+(\.\d+)?[a-z]+$/i;function R(n){return typeof n=="string"&&P.test(n)}function k(n){return g(n)?null:f(n)||R(n)?["borderWidth",l(n)]:h(n)?["borderColor",n]:["border",String(n)]}function _(n,i,t){let e;for(const s of Object.keys(n))if(e=i[s],e){const d=e(n[s],n);if(d){const[L,$]=d;t[L]=$}}}const W=["width","minWidth","maxWidth","height","minHeight","maxHeight","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","paddingInline","paddingBlock","margin","marginTop","marginBottom","marginLeft","marginRight","marginInline","marginBlock","gap","fontSize","lineHeight"],w=["background","color"],C={radius:n=>["borderRadius",l(n)],align:n=>["alignItems",n??""],justify:n=>["justifyContent",n??""],column:n=>n?["flexDirection","column"]:null,wrap:n=>n?["flexWrap",p(n)?"wrap":n]:null,breakWord:n=>n?["overflowWrap","break-word"]:null,bold:n=>n?["fontWeight","bold"]:null,thin:n=>n?["fontWeight","500"]:null,...b(["flex","grid","inline","inlineFlex","inlineBlock"]),scroll:n=>n?[`overflow${typeof n=="string"?n.toUpperCase():""}`,"auto"]:null,...y(W),...S(w),border:n=>k(n),fs:n=>o("fontSize",n,l(n)),bg:n=>o("background",n),fontWeight:n=>o("fontWeight",n),fw:n=>o("fontWeight",n)};function E(n,i){const t={...n.style},e={...C,...i};return _(n,e,t),t}r.createPropStyles=E,r.formatReturn=o,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}); | ||
* Released on: 2024-04-24 23:27:26 (GMT+0900) | ||
*//*! | ||
* date-utils-2020 v1.1.1 | ||
* Author: Capricorncd | ||
* Repository: https://github.com/capricorncd/date-utils-2020#readme | ||
* Released on: 2024/04/02 21:28:40 GMT+0900 | ||
*/function s(n){return typeof n=="string"?/^-?\d+(\.\d+)?$/.test(n):u(n)}function u(n){return Number.isFinite(n)}function c(n){return typeof n>"u"||n===null}const p=/^((-?\d+(\.\d+)?)?([a-z]+|%)?\s*)+$/i,m=/(\d+\s|\s\d+$)/;function l(n,t="px"){if(s(n))return`${n}${t}`;if(n&&typeof n=="string"){const e=n.trim().replace(/\s{2,}/g," ");return p.test(e)&&m.test(e)?e.trim().split(" ").map(r=>l(r,t)).join(" "):e}return""}function h(n="",t="-"){return n.replace(/[A-Z]/g,(e,r)=>`${r>0?t:""}${e.toLowerCase()}`)}function b(n){return typeof n=="boolean"}const y=/^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i;function S(n){return typeof n!="string"?!1:y.test(n)}function i(n,t,e){return!t&&t!==0?null:[n,e??String(t)]}function d(n,t){return n.reduce((e,r)=>(e[r]=f=>t(r,f),e),{})}function R(n){return d(n,(t,e)=>i("display",e,h(t)))}function P(n){return d(n,(t,e)=>i(t,e,l(e)))}function k(n){return d(n,(t,e)=>[t,e])}const C=/^-?\d+(\.\d+)?[a-z]+$/i;function w(n){return typeof n=="string"&&C.test(n)}function I(n){return c(n)?null:s(n)||w(n)?["borderWidth",l(n)]:S(n)?["borderColor",n]:["border",String(n)]}function L(n,t,e){let r;for(const f of Object.keys(n))if(r=t[f],r){const g=r(n[f],n);if(g){const[O,T]=g;e[O]=T}}}const _={p:"padding",pt:"paddingTop",pb:"paddingBottom",pl:"paddingLeft",pr:"paddingRight",px:"paddingInline",py:"paddingBlock",m:"margin",mt:"marginTop",mb:"marginBottom",ml:"marginLeft",mr:"marginRight",mx:"marginInline",my:"marginBlock",fs:"fontSize",lh:"lineHeight",bg:"background",fw:"fontWeight"},x=["width","minWidth","maxWidth","height","minHeight","maxHeight","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","paddingInline","paddingBlock","margin","marginTop","marginBottom","marginLeft","marginRight","marginInline","marginBlock","gap","fontSize","lineHeight"],B=["background","color"],a={radius:n=>i("borderRadius",n,l(n)),align:n=>i("alignItems",n),alignContent:n=>i("alignContent",n),justify:n=>i("justifyContent",n),justifyItems:n=>i("justifyItems",n),column:n=>i("flexDirection",n,"column"),wrap:n=>n?["flexWrap",b(n)?"wrap":n]:null,breakWord:n=>i("overflowWrap",n,"break-word"),bold:n=>i("fontWeight",n,"bold"),thin:n=>i("fontWeight",n,"500"),...R(["flex","grid","inline","inlineFlex","inlineBlock"]),scroll:n=>n?[`overflow${typeof n=="string"?n.toUpperCase():""}`,"auto"]:null,...P(x),...k(B),border:n=>I(n),fontWeight:n=>i("fontWeight",n),tempColumns:n=>i("gridTemplateColumns",l(n,"fr")),tempRows:n=>i("gridTemplateRows",l(n,"fr"))};for(const[n,t]of Object.entries(_))if(a[t])a[n]=a[t];else throw new Error(`The alias of ${n} does not exist`);function E(n,t){const e={...n.style},r={...a,...t};return L(n,r,e),e}o.createPropStyles=E,o.formatReturn=i,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})}); |
@@ -12,10 +12,15 @@ /** | ||
width?: number | string | ||
// min-width | ||
minWidth?: number | string | ||
// max-width | ||
maxWidth?: number | string | ||
// height | ||
height?: number | string | ||
// min-height | ||
minHeight?: number | string | ||
// max-height | ||
maxHeight?: number | string | ||
// display | ||
// display flex | ||
flex?: boolean | ||
// display grid | ||
grid?: boolean | ||
@@ -25,31 +30,70 @@ inlineFlex?: boolean | ||
inline?: boolean | ||
// flex/grid | ||
// flex/grid's gap | ||
gap?: number | string | ||
// flex-direction | ||
column?: boolean | ||
// align-items | ||
align?: Property.AlignItems | ||
// align-content | ||
alignContent?: Property.AlignContent | ||
// justify-content | ||
justify?: Property.JustifyContent | ||
// justify-items | ||
justifyItems?: Property.JustifyItems | ||
// flex-wrap | ||
wrap?: boolean | Property.FlexWrap | ||
// padding | ||
padding?: number | string | ||
// padding | ||
p?: number | string | ||
// padding-top | ||
paddingTop?: number | string | ||
// padding-top | ||
pt?: number | string | ||
paddingBottom?: number | string | ||
// padding-bottom | ||
pb?: number | string | ||
paddingLeft?: number | string | ||
// padding-left | ||
pl?: number | string | ||
paddingRight?: number | string | ||
// padding-right | ||
pr?: number | string | ||
paddingInline?: number | string | ||
// padding-inline | ||
px?: number | string | ||
paddingBlock?: number | string | ||
// padding-block | ||
py?: number | string | ||
// margin | ||
margin?: number | string | ||
// margin | ||
m?: number | string | ||
marginTop?: number | string | ||
// margin-top | ||
mt?: number | string | ||
marginBottom?: number | string | ||
// margin-bottom | ||
mb?: number | string | ||
marginLeft?: number | string | ||
// margin-left | ||
ml?: number | string | ||
marginRight?: number | string | ||
// margin-right | ||
mr?: number | string | ||
marginInline?: number | string | ||
// margin-inline | ||
mx?: number | string | ||
marginBlock?: number | string | ||
// margin-block | ||
my?: number | string | ||
// border-radius | ||
radius?: string | number | ||
// font | ||
// font-size | ||
fontSize?: string | number | ||
// fontSize | ||
// font-size | ||
fs?: string | number | ||
lineHeight?: string | number | ||
// line-height | ||
lh?: string | number | ||
// color | ||
@@ -73,2 +117,6 @@ color?: string | ||
border?: string | number | ||
// grid-template-columns | ||
tempColumns?: string | ||
// grid-template-rows | ||
tempRows?: string | ||
} | ||
@@ -75,0 +123,0 @@ export type PropMappingHandler<T extends BaseProps> = ( |
{ | ||
"name": "@prop-styles/core", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "The library provides a static method createPropStyles to create Style objects.", | ||
@@ -21,3 +21,3 @@ "main": "src/index.ts", | ||
"scripts": { | ||
"build": "vite build --emptyOutDir", | ||
"build": "vite build --emptyOutDir && node ../../node_modules/@zx-libs/header --dir=dist", | ||
"docs": "node scripts/docs.mjs", | ||
@@ -24,0 +24,0 @@ "pl": "npm run build && npm run docs && npm publish", |
109
README.md
@@ -43,3 +43,3 @@ # @prop-styles/core | ||
// custom mapping handler | ||
color: (value) => ['--color', value] | ||
color: (v) => ['--color', v] | ||
}) // { width: '100px', '--color', '#fff' } | ||
@@ -87,2 +87,6 @@ ``` | ||
Commonly used CSS properties for components. | ||
csstype [Property](https://github.com/frenic/csstype) | ||
Prop|Types|Required|Description | ||
@@ -92,35 +96,52 @@ :--|:--|:--|:-- | ||
width|`number`/`string`|no|width | ||
minWidth|`number`/`string`|no|- | ||
maxWidth|`number`/`string`|no|- | ||
minWidth|`number`/`string`|no|min-width | ||
maxWidth|`number`/`string`|no|max-width | ||
height|`number`/`string`|no|height | ||
minHeight|`number`/`string`|no|- | ||
maxHeight|`number`/`string`|no|- | ||
flex|`boolean`|no|display | ||
grid|`boolean`|no|- | ||
minHeight|`number`/`string`|no|min-height | ||
maxHeight|`number`/`string`|no|max-height | ||
flex|`boolean`|no|display flex | ||
grid|`boolean`|no|display grid | ||
inlineFlex|`boolean`|no|- | ||
inlineBlock|`boolean`|no|- | ||
inline|`boolean`|no|- | ||
gap|`number`/`string`|no|flex/grid | ||
column|`boolean`|no|- | ||
align|`Property.AlignItems`|no|- | ||
justify|`Property.JustifyContent`|no|- | ||
wrap|`boolean`/`Property.FlexWrap`|no|- | ||
gap|`number`/`string`|no|flex/grid's gap | ||
column|`boolean`|no|flex-direction | ||
align|`Property.AlignItems`|no|align-items | ||
alignContent|`Property.AlignContent`|no|align-content | ||
justify|`Property.JustifyContent`|no|justify-content | ||
justifyItems|`Property.JustifyItems`|no|justify-items | ||
wrap|`boolean`/`Property.FlexWrap`|no|flex-wrap | ||
padding|`number`/`string`|no|padding | ||
paddingTop|`number`/`string`|no|- | ||
p|`number`/`string`|no|padding | ||
paddingTop|`number`/`string`|no|padding-top | ||
pt|`number`/`string`|no|padding-top | ||
paddingBottom|`number`/`string`|no|- | ||
pb|`number`/`string`|no|padding-bottom | ||
paddingLeft|`number`/`string`|no|- | ||
pl|`number`/`string`|no|padding-left | ||
paddingRight|`number`/`string`|no|- | ||
pr|`number`/`string`|no|padding-right | ||
paddingInline|`number`/`string`|no|- | ||
px|`number`/`string`|no|padding-inline | ||
paddingBlock|`number`/`string`|no|- | ||
py|`number`/`string`|no|padding-block | ||
margin|`number`/`string`|no|margin | ||
m|`number`/`string`|no|margin | ||
marginTop|`number`/`string`|no|- | ||
mt|`number`/`string`|no|margin-top | ||
marginBottom|`number`/`string`|no|- | ||
mb|`number`/`string`|no|margin-bottom | ||
marginLeft|`number`/`string`|no|- | ||
ml|`number`/`string`|no|margin-left | ||
marginRight|`number`/`string`|no|- | ||
mr|`number`/`string`|no|margin-right | ||
marginInline|`number`/`string`|no|- | ||
mx|`number`/`string`|no|margin-inline | ||
marginBlock|`number`/`string`|no|- | ||
my|`number`/`string`|no|margin-block | ||
radius|`string`/`number`|no|border-radius | ||
fontSize|`string`/`number`|no|font | ||
fs|`string`/`number`|no|fontSize | ||
fontSize|`string`/`number`|no|font-size | ||
fs|`string`/`number`|no|font-size | ||
lineHeight|`string`/`number`|no|- | ||
lh|`string`/`number`|no|line-height | ||
color|`string`|no|color | ||
@@ -136,2 +157,4 @@ background|`Property.Background`|no|- | ||
border|`string`/`number`|no|border, border-width, border-color | ||
tempColumns|`string`|no|grid-template-columns | ||
tempRows|`string`|no|grid-template-rows | ||
@@ -147,10 +170,15 @@ <details> | ||
width?: number | string | ||
// min-width | ||
minWidth?: number | string | ||
// max-width | ||
maxWidth?: number | string | ||
// height | ||
height?: number | string | ||
// min-height | ||
minHeight?: number | string | ||
// max-height | ||
maxHeight?: number | string | ||
// display | ||
// display flex | ||
flex?: boolean | ||
// display grid | ||
grid?: boolean | ||
@@ -160,31 +188,70 @@ inlineFlex?: boolean | ||
inline?: boolean | ||
// flex/grid | ||
// flex/grid's gap | ||
gap?: number | string | ||
// flex-direction | ||
column?: boolean | ||
// align-items | ||
align?: Property.AlignItems | ||
// align-content | ||
alignContent?: Property.AlignContent | ||
// justify-content | ||
justify?: Property.JustifyContent | ||
// justify-items | ||
justifyItems?: Property.JustifyItems | ||
// flex-wrap | ||
wrap?: boolean | Property.FlexWrap | ||
// padding | ||
padding?: number | string | ||
// padding | ||
p?: number | string | ||
// padding-top | ||
paddingTop?: number | string | ||
// padding-top | ||
pt?: number | string | ||
paddingBottom?: number | string | ||
// padding-bottom | ||
pb?: number | string | ||
paddingLeft?: number | string | ||
// padding-left | ||
pl?: number | string | ||
paddingRight?: number | string | ||
// padding-right | ||
pr?: number | string | ||
paddingInline?: number | string | ||
// padding-inline | ||
px?: number | string | ||
paddingBlock?: number | string | ||
// padding-block | ||
py?: number | string | ||
// margin | ||
margin?: number | string | ||
// margin | ||
m?: number | string | ||
marginTop?: number | string | ||
// margin-top | ||
mt?: number | string | ||
marginBottom?: number | string | ||
// margin-bottom | ||
mb?: number | string | ||
marginLeft?: number | string | ||
// margin-left | ||
ml?: number | string | ||
marginRight?: number | string | ||
// margin-right | ||
mr?: number | string | ||
marginInline?: number | string | ||
// margin-inline | ||
mx?: number | string | ||
marginBlock?: number | string | ||
// margin-block | ||
my?: number | string | ||
// border-radius | ||
radius?: string | number | ||
// font | ||
// font-size | ||
fontSize?: string | number | ||
// fontSize | ||
// font-size | ||
fs?: string | number | ||
lineHeight?: string | number | ||
// line-height | ||
lh?: string | number | ||
// color | ||
@@ -208,2 +275,6 @@ color?: string | ||
border?: string | number | ||
// grid-template-columns | ||
tempColumns?: string | ||
// grid-template-rows | ||
tempRows?: string | ||
} | ||
@@ -210,0 +281,0 @@ ``` |
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
20961
341
334