Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prop-styles/core

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prop-styles/core - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

140

dist/index.es.js
/*!
* @prop-styles/core version 0.0.9
* @prop-styles/core version 0.0.10
* Author: Capricorncd<capricorncd@qq.com>
* Homepage: https://github.com/capricorncd/prop-styles#readme
* Released on: 2024-04-29 15:56:31 (GMT+0900)
* Released on: 2024-04-29 22:02:44 (GMT+0900)
*/

@@ -20,12 +20,9 @@ /*!

function f(t) {
return typeof t == "string" ? /^-?\d+(\.\d+)?$/.test(t) : p(t);
return typeof t == "string" ? /^-?\d+(\.\d+)?$/.test(t) : c(t);
}
function p(t) {
function c(t) {
return Number.isFinite(t);
}
function m(t) {
return typeof t > "u" || t === null;
}
const u = /^((-?\d+(\.\d+)?)?([a-z]+|%)?\s*)+$/i, h = /(\d+\s|\s\d+$)/;
function o(t, n = "px") {
const m = /^((-?\d+(\.\d+)?)?([a-z]+|%)?\s*)+$/i, u = /(\d+\s|\s\d+$)/;
function a(t, n = "px") {
if (f(t))

@@ -35,60 +32,68 @@ return `${t}${n}`;

const i = t.trim().replace(/\s{2,}/g, " ");
return u.test(i) && h.test(i) ? i.trim().split(" ").map((r) => o(r, n)).join(" ") : i;
return m.test(i) && u.test(i) ? i.trim().split(" ").map((e) => a(e, n)).join(" ") : i;
}
return "";
}
function b(t = "", n = "-") {
function h(t = "", n = "-") {
return t.replace(
/[A-Z]/g,
(i, r) => `${r > 0 ? n : ""}${i.toLowerCase()}`
(i, e) => `${e > 0 ? n : ""}${i.toLowerCase()}`
);
}
function y(t) {
function b(t) {
return typeof t == "boolean";
}
const w = /^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i;
function C(t) {
return typeof t != "string" ? !1 : w.test(t);
const y = /^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i;
function w(t) {
return typeof t != "string" ? !1 : y.test(t);
}
function R(t, n, i) {
function C(t, n, i) {
return !n && n !== 0 ? null : [t, i ?? String(n)];
}
const e = R;
function l(t, n) {
return t.reduce((i, r) => (i[r] = (a) => n(r, a), i), {});
const o = C;
function g(t, n, i) {
t.forEach((e) => {
i[e] = (s) => n(e, s);
});
}
function S(t) {
return l(
function R(t, n) {
return g(
t,
(n, i) => e("display", i, b(n))
(i, e) => o("display", e, h(i)),
n
);
}
function k(t) {
return l(
function S(t, n) {
return g(
t,
(n, i) => e(n, i, o(i))
(i, e) => o(i, e, a(e)),
n
);
}
function x(t) {
return l(t, (n, i) => e(n, i));
function k(t, n) {
return g(
t,
(i, e) => o(i, e),
n
);
}
const I = /^-?\d+(\.\d+)?[a-z]+$/i;
function P(t) {
function x(t) {
return typeof t == "string" && I.test(t);
}
function j(t) {
return m(t) ? null : f(t) || P(t) ? ["borderWidth", o(t)] : C(t) ? ["borderColor", t] : ["border", String(t)];
function L(t) {
return f(t) || x(t) ? ["borderWidth", a(t)] : w(t) ? ["borderColor", t] : o("border", t);
}
function B(t, n, i) {
let r;
for (const a of Object.keys(t))
if (r = n[a], r) {
const g = r(t[a], t);
if (g) {
const [d, c] = g;
i[d] = c;
function E(t, n, i) {
let e;
for (const s of Object.keys(t))
if (e = n[s], e) {
const l = e(t[s], t);
if (l) {
const [d, p] = l;
i[d] = p;
}
}
}
const L = {
const _ = {
p: "padding",

@@ -127,3 +132,3 @@ pt: "paddingTop",

tf: "transform"
}, $ = [
}, P = [
"width",

@@ -157,3 +162,3 @@ "minWidth",

"inset"
], _ = [
], j = [
"background",

@@ -177,40 +182,39 @@ "color",

"inlineBlock"
], s = {
radius: (t) => e("borderRadius", t, o(t)),
column: (t) => e("flexDirection", t, "column"),
wrap: (t) => t ? ["flexWrap", y(t) ? "wrap" : t] : null,
breakWord: (t) => e("overflowWrap", t, "break-word"),
], r = {
radius: (t) => o("borderRadius", t, a(t)),
column: (t) => o("flexDirection", t, "column"),
wrap: (t) => o("flexWrap", t, b(t) ? "wrap" : t),
breakWord: (t) => o("overflowWrap", t, "break-word"),
// font
bold: (t) => e("fontWeight", t, "bold"),
thin: (t) => e("fontWeight", t, "500"),
// display
...S(A),
bold: (t) => o("fontWeight", t, "bold"),
thin: (t) => o("fontWeight", t, "500"),
// overflow
scroll: (t) => t ? [`overflow${typeof t == "string" ? t.toUpperCase() : ""}`, "auto"] : null,
...k($),
...x(_),
scroll: (t) => o(`overflow${typeof t == "string" ? t.toUpperCase() : ""}`, t, "auto"),
// border
border: (t) => j(t),
tempColumns: (t) => e("gridTemplateColumns", o(t, "fr")),
tempRows: (t) => e("gridTemplateRows", o(t, "fr")),
nowrap: (t) => e("whiteSpace", t, "nowrap")
border: (t) => L(t),
tempColumns: (t) => o("gridTemplateColumns", t, a(t, "fr")),
tempRows: (t) => o("gridTemplateRows", t, a(t, "fr")),
nowrap: (t) => o("whiteSpace", t, "nowrap")
};
for (const [t, n] of Object.entries(L))
if (s[n])
s[t] = s[n];
R(A, r);
S(P, r);
k(j, r);
for (const [t, n] of Object.entries(_))
if (r[n])
r[t] = r[n];
else
throw new Error(`The alias of ${t} does not exist`);
function E(t, n) {
function B(t, n) {
const i = {
...t.style
}, r = {
...s,
}, e = {
...r,
...n
};
return B(t, r, i), i;
return E(t, e, i), i;
}
export {
E as createPropStyles,
e as f,
R as formatReturn
B as createPropStyles,
o as f,
C as formatReturn
};
/*!
* @prop-styles/core version 0.0.9
* @prop-styles/core version 0.0.10
* Author: Capricorncd<capricorncd@qq.com>
* Homepage: https://github.com/capricorncd/prop-styles#readme
* Released on: 2024-04-29 15:56:31 (GMT+0900)
* Released on: 2024-04-29 22:02:44 (GMT+0900)
*/
(function(r,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(r=typeof globalThis<"u"?globalThis:r||self,s(r["prop-styles-core"]={}))})(this,function(r){"use strict";/*!
(function(r,a){typeof exports=="object"&&typeof module<"u"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(r=typeof globalThis<"u"?globalThis:r||self,a(r["prop-styles-core"]={}))})(this,function(r){"use strict";/*!
* @zx-libs/utils version 0.0.4

@@ -17,2 +17,2 @@ * Author: Capricorncd<capricorncd@qq.com>

* Released on: 2024/04/02 21:28:40 GMT+0900
*/function s(t){return typeof t=="string"?/^-?\d+(\.\d+)?$/.test(t):p(t)}function p(t){return Number.isFinite(t)}function c(t){return typeof t>"u"||t===null}const m=/^((-?\d+(\.\d+)?)?([a-z]+|%)?\s*)+$/i,h=/(\d+\s|\s\d+$)/;function a(t,n="px"){if(s(t))return`${t}${n}`;if(t&&typeof t=="string"){const e=t.trim().replace(/\s{2,}/g," ");return m.test(e)&&h.test(e)?e.trim().split(" ").map(o=>a(o,n)).join(" "):e}return""}function b(t="",n="-"){return t.replace(/[A-Z]/g,(e,o)=>`${o>0?n:""}${e.toLowerCase()}`)}function y(t){return typeof t=="boolean"}const S=/^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i;function R(t){return typeof t!="string"?!1:S.test(t)}function d(t,n,e){return!n&&n!==0?null:[t,e??String(n)]}const i=d;function g(t,n){return t.reduce((e,o)=>(e[o]=f=>n(o,f),e),{})}function w(t){return g(t,(n,e)=>i("display",e,b(n)))}function C(t){return g(t,(n,e)=>i(n,e,a(e)))}function P(t){return g(t,(n,e)=>i(n,e))}const I=/^-?\d+(\.\d+)?[a-z]+$/i;function k(t){return typeof t=="string"&&I.test(t)}function x(t){return c(t)?null:s(t)||k(t)?["borderWidth",a(t)]:R(t)?["borderColor",t]:["border",String(t)]}function j(t,n,e){let o;for(const f of Object.keys(t))if(o=n[f],o){const u=o(t[f],t);if(u){const[A,E]=u;e[A]=E}}}const L={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",ta:"textAlign",gtc:"tempColumns",gtr:"tempRows",align:"alignItems",ai:"alignItems",ac:"alignContent",ji:"justifyItems",justify:"justifyContent",jc:"justifyContent",t:"top",r:"right",l:"left",b:"bottom",z:"zIndex",tf:"transform"},_=["width","minWidth","maxWidth","height","minHeight","maxHeight","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","paddingInline","paddingBlock","margin","marginTop","marginBottom","marginLeft","marginRight","marginInline","marginBlock","gap","fontSize","lineHeight","top","right","bottom","left","inset"],B=["background","color","alignItems","alignContent","justifyContent","justifyItems","fontWeight","whiteSpace","textAlign","position","zIndex","transform"],l={radius:t=>i("borderRadius",t,a(t)),column:t=>i("flexDirection",t,"column"),wrap:t=>t?["flexWrap",y(t)?"wrap":t]:null,breakWord:t=>i("overflowWrap",t,"break-word"),bold:t=>i("fontWeight",t,"bold"),thin:t=>i("fontWeight",t,"500"),...w(["flex","grid","inline","inlineFlex","inlineBlock"]),scroll:t=>t?[`overflow${typeof t=="string"?t.toUpperCase():""}`,"auto"]:null,...C(_),...P(B),border:t=>x(t),tempColumns:t=>i("gridTemplateColumns",a(t,"fr")),tempRows:t=>i("gridTemplateRows",a(t,"fr")),nowrap:t=>i("whiteSpace",t,"nowrap")};for(const[t,n]of Object.entries(L))if(l[n])l[t]=l[n];else throw new Error(`The alias of ${t} does not exist`);function $(t,n){const e={...t.style},o={...l,...n};return j(t,o,e),e}r.createPropStyles=$,r.f=i,r.formatReturn=d,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
*/function a(t){return typeof t=="string"?/^-?\d+(\.\d+)?$/.test(t):c(t)}function c(t){return Number.isFinite(t)}const m=/^((-?\d+(\.\d+)?)?([a-z]+|%)?\s*)+$/i,u=/(\d+\s|\s\d+$)/;function f(t,n="px"){if(a(t))return`${t}${n}`;if(t&&typeof t=="string"){const i=t.trim().replace(/\s{2,}/g," ");return m.test(i)&&u.test(i)?i.trim().split(" ").map(e=>f(e,n)).join(" "):i}return""}function h(t="",n="-"){return t.replace(/[A-Z]/g,(i,e)=>`${e>0?n:""}${i.toLowerCase()}`)}function b(t){return typeof t=="boolean"}const y=/^(#[a-f0-9]{3,8}|(rgba?|hsla?|hwb|lab|lch|oklab|oklch|hwb|lch|light-dark)\(.+\))$/i;function S(t){return typeof t!="string"?!1:y.test(t)}function d(t,n,i){return!n&&n!==0?null:[t,i??String(n)]}const o=d;function l(t,n,i){t.forEach(e=>{i[e]=g=>n(e,g)})}function R(t,n){return l(t,(i,e)=>o("display",e,h(i)),n)}function w(t,n){return l(t,(i,e)=>o(i,e,f(e)),n)}function C(t,n){return l(t,(i,e)=>o(i,e),n)}const k=/^-?\d+(\.\d+)?[a-z]+$/i;function I(t){return typeof t=="string"&&k.test(t)}function x(t){return a(t)||I(t)?["borderWidth",f(t)]:S(t)?["borderColor",t]:o("border",t)}function L(t,n,i){let e;for(const g of Object.keys(t))if(e=n[g],e){const p=e(t[g],t);if(p){const[B,$]=p;i[B]=$}}}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",ta:"textAlign",gtc:"tempColumns",gtr:"tempRows",align:"alignItems",ai:"alignItems",ac:"alignContent",ji:"justifyItems",justify:"justifyContent",jc:"justifyContent",t:"top",r:"right",l:"left",b:"bottom",z:"zIndex",tf:"transform"},j=["width","minWidth","maxWidth","height","minHeight","maxHeight","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","paddingInline","paddingBlock","margin","marginTop","marginBottom","marginLeft","marginRight","marginInline","marginBlock","gap","fontSize","lineHeight","top","right","bottom","left","inset"],E=["background","color","alignItems","alignContent","justifyContent","justifyItems","fontWeight","whiteSpace","textAlign","position","zIndex","transform"],_=["flex","grid","inline","inlineFlex","inlineBlock"],s={radius:t=>o("borderRadius",t,f(t)),column:t=>o("flexDirection",t,"column"),wrap:t=>o("flexWrap",t,b(t)?"wrap":t),breakWord:t=>o("overflowWrap",t,"break-word"),bold:t=>o("fontWeight",t,"bold"),thin:t=>o("fontWeight",t,"500"),scroll:t=>o(`overflow${typeof t=="string"?t.toUpperCase():""}`,t,"auto"),border:t=>x(t),tempColumns:t=>o("gridTemplateColumns",t,f(t,"fr")),tempRows:t=>o("gridTemplateRows",t,f(t,"fr")),nowrap:t=>o("whiteSpace",t,"nowrap")};R(_,s),w(j,s),C(E,s);for(const[t,n]of Object.entries(P))if(s[n])s[t]=s[n];else throw new Error(`The alias of ${t} does not exist`);function A(t,n){const i={...t.style},e={...s,...n};return L(t,e,i),i}r.createPropStyles=A,r.f=o,r.formatReturn=d,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
/*!
* @prop-styles/core version 0.0.9
* @prop-styles/core version 0.0.10
* Author: Capricorncd<capricorncd@qq.com>
* Homepage: https://github.com/capricorncd/prop-styles#readme
* Released on: 2024-04-29 15:56:31 (GMT+0900)
* Released on: 2024-04-29 22:02:44 (GMT+0900)
*/

@@ -30,8 +30,11 @@ import type { Property } from 'csstype';

maxHeight?: number | string
// display flex
// display: flex
flex?: boolean
// display grid
// display: grid
grid?: boolean
// display: inline-flex
inlineFlex?: boolean
// display: inline-block
inlineBlock?: boolean
// display: inline
inline?: boolean

@@ -76,14 +79,19 @@ // flex/grid's gap

pt?: number | string
// padding-bottom
paddingBottom?: number | string
// padding-bottom
pb?: number | string
// padding-left
paddingLeft?: number | string
// padding-left
pl?: number | string
// padding-right
paddingRight?: number | string
// padding-right
pr?: number | string
// padding-inline
paddingInline?: number | string
// padding-inline
px?: number | string
// padding-block
paddingBlock?: number | string

@@ -96,17 +104,23 @@ // padding-block

m?: number | string
// margin-top
marginTop?: number | string
// margin-top
mt?: number | string
// margin-bottom
marginBottom?: number | string
// margin-bottom
mb?: number | string
// margin-left
marginLeft?: number | string
// margin-left
ml?: number | string
// margin-right
marginRight?: number | string
// margin-right
mr?: number | string
// margin-inline
marginInline?: number | string
// margin-inline
mx?: number | string
// margin-block
marginBlock?: number | string

@@ -121,2 +135,3 @@ // margin-block

fs?: string | number
// line-height
lineHeight?: string | number

@@ -127,2 +142,3 @@ // line-height

color?: string
// background
background?: Property.Background

@@ -139,4 +155,5 @@ // background

thin?: boolean
// font-weight
fontWeight?: Property.FontWeight
// fontWeight
// font-weight
fw?: Property.FontWeight

@@ -146,9 +163,9 @@ // border, border-width, border-color

// grid-template-columns
tempColumns?: string
tempColumns?: string | number
// grid-template-columns
gtc?: string
gtc?: string | number
// grid-template-rows
tempRows?: string
tempRows?: string | number
// grid-template-rows
gtr?: string
gtr?: string | number
// text-align

@@ -163,8 +180,11 @@ textAlign?: Property.TextAlign

t?: string | number
// right
right?: string | number
// right
r?: string | number
// bottom
bottom?: string | number
// bottom
b?: string | number
// left
left?: string | number

@@ -171,0 +191,0 @@ // left

{
"name": "@prop-styles/core",
"version": "0.0.9",
"version": "0.0.10",
"description": "The library provides a static method createPropStyles to create Style objects.",

@@ -5,0 +5,0 @@ "main": "src/index.ts",

@@ -18,8 +18,8 @@ # @prop-styles/core

```js
import { createPropStyles, formatReturn } from '@prop-styles/core'
import { createPropStyles, f } from '@prop-styles/core'
const style = createPropStyles({ color: 'red', width: 100 }, {
color: (value) => value ? ['--color-primary', value] : null
// or use formatReturn to make null judgment
// color: (value) => formatReturn('--color-primary', value)
// or Use f function to remove null/undefined props
// color: (value) => f('--color-primary', value)
})

@@ -73,9 +73,9 @@

:--|:--|:--|:--
key|`K`|yes|The PropMappingHandlerReturn `key` or customize `key`
key|`K`|yes|The PropMappingHandler Return `key` or customize `key`
value|`V`|yes|The `props[prop]'s value`
strValue|`string`|no|Customize the `value` of PropMappingHandlerReturn
strValue|`string`|no|Customize the `value` of PropMappingHandler Return
- @generic `K extends string, V`
- @returns `[key: string, val: string] | null` see [PropMappingHandlerReturn](#PropMappingHandlerReturn)
- @returns `[key: string, val: string] | null`

@@ -89,12 +89,12 @@ ### formatReturn(key, value, strValue)

```js
formatReturn('width', 100) // ['width', '100']
formatReturn('width', '100px') // ['width', '100px']
formatReturn('width', 100, '100%') // ['width', '100%']
f('width', 100) // ['width', '100']
f('width', '100px') // ['width', '100px']
f('width', 100, '100%') // ['width', '100%']
formatReturn('key', false) // null
formatReturn('key', '') // null
formatReturn('key', undefined) // null
formatReturn('key', null) // null
formatReturn('key', null, 'stringValue') // null
formatReturn('key', true, 'stringValue') // ['key', 'stringValue']
f('key', false) // null
f('key', '') // null
f('key', undefined) // null
f('key', null) // null
f('key', null, 'stringValue') // null
f('key', true, 'stringValue') // ['key', 'stringValue']
```

@@ -104,9 +104,9 @@

:--|:--|:--|:--
key|`K`|yes|The PropMappingHandlerReturn `key` or customize `key`
key|`K`|yes|The PropMappingHandler Return `key` or customize `key`
value|`V`|yes|The `props[prop]'s value`
strValue|`string`|no|Customize the `value` of PropMappingHandlerReturn
strValue|`string`|no|Customize the `value` of PropMappingHandler Return
- @generic `K extends string, V`
- @returns `[key: string, val: string] | null` see [PropMappingHandlerReturn](#PropMappingHandlerReturn)
- @returns `[key: string, val: string] | null`

@@ -130,7 +130,7 @@ ## Types

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|-
flex|`boolean`|no|display: flex
grid|`boolean`|no|display: grid
inlineFlex|`boolean`|no|display: inline-flex
inlineBlock|`boolean`|no|display: inline-block
inline|`boolean`|no|display: inline
gap|`number`/`string`|no|flex/grid's gap

@@ -155,25 +155,25 @@ column|`boolean`|no|flex-direction

pt|`number`/`string`|no|padding-top
paddingBottom|`number`/`string`|no|-
paddingBottom|`number`/`string`|no|padding-bottom
pb|`number`/`string`|no|padding-bottom
paddingLeft|`number`/`string`|no|-
paddingLeft|`number`/`string`|no|padding-left
pl|`number`/`string`|no|padding-left
paddingRight|`number`/`string`|no|-
paddingRight|`number`/`string`|no|padding-right
pr|`number`/`string`|no|padding-right
paddingInline|`number`/`string`|no|-
paddingInline|`number`/`string`|no|padding-inline
px|`number`/`string`|no|padding-inline
paddingBlock|`number`/`string`|no|-
paddingBlock|`number`/`string`|no|padding-block
py|`number`/`string`|no|padding-block
margin|`number`/`string`|no|margin
m|`number`/`string`|no|margin
marginTop|`number`/`string`|no|-
marginTop|`number`/`string`|no|margin-top
mt|`number`/`string`|no|margin-top
marginBottom|`number`/`string`|no|-
marginBottom|`number`/`string`|no|margin-bottom
mb|`number`/`string`|no|margin-bottom
marginLeft|`number`/`string`|no|-
marginLeft|`number`/`string`|no|margin-left
ml|`number`/`string`|no|margin-left
marginRight|`number`/`string`|no|-
marginRight|`number`/`string`|no|margin-right
mr|`number`/`string`|no|margin-right
marginInline|`number`/`string`|no|-
marginInline|`number`/`string`|no|margin-inline
mx|`number`/`string`|no|margin-inline
marginBlock|`number`/`string`|no|-
marginBlock|`number`/`string`|no|margin-block
my|`number`/`string`|no|margin-block

@@ -183,6 +183,6 @@ radius|`string`/`number`|no|border-radius

fs|`string`/`number`|no|font-size
lineHeight|`string`/`number`|no|-
lineHeight|`string`/`number`|no|line-height
lh|`string`/`number`|no|line-height
color|`string`|no|color
background|`Property.Background`|no|-
background|`Property.Background`|no|background
bg|`Property.Background`|no|background

@@ -193,9 +193,9 @@ scroll|`boolean`/`'x'`/`'y'`|no|scroll direction

thin|`boolean`|no|font-weight: 500
fontWeight|`Property.FontWeight`|no|-
fw|`Property.FontWeight`|no|fontWeight
fontWeight|`Property.FontWeight`|no|font-weight
fw|`Property.FontWeight`|no|font-weight
border|`string`/`number`|no|border, border-width, border-color
tempColumns|`string`|no|grid-template-columns
gtc|`string`|no|grid-template-columns
tempRows|`string`|no|grid-template-rows
gtr|`string`|no|grid-template-rows
tempColumns|`string`/`number`|no|grid-template-columns
gtc|`string`/`number`|no|grid-template-columns
tempRows|`string`/`number`|no|grid-template-rows
gtr|`string`/`number`|no|grid-template-rows
textAlign|`Property.TextAlign`|no|text-align

@@ -206,7 +206,7 @@ ta|`Property.TextAlign`|no|text-align

t|`string`/`number`|no|top
right|`string`/`number`|no|-
right|`string`/`number`|no|right
r|`string`/`number`|no|right
bottom|`string`/`number`|no|-
bottom|`string`/`number`|no|bottom
b|`string`/`number`|no|bottom
left|`string`/`number`|no|-
left|`string`/`number`|no|left
l|`string`/`number`|no|left

@@ -238,8 +238,11 @@ zIndex|`Property.ZIndex`|no|z-index

maxHeight?: number | string
// display flex
// display: flex
flex?: boolean
// display grid
// display: grid
grid?: boolean
// display: inline-flex
inlineFlex?: boolean
// display: inline-block
inlineBlock?: boolean
// display: inline
inline?: boolean

@@ -284,14 +287,19 @@ // flex/grid's gap

pt?: number | string
// padding-bottom
paddingBottom?: number | string
// padding-bottom
pb?: number | string
// padding-left
paddingLeft?: number | string
// padding-left
pl?: number | string
// padding-right
paddingRight?: number | string
// padding-right
pr?: number | string
// padding-inline
paddingInline?: number | string
// padding-inline
px?: number | string
// padding-block
paddingBlock?: number | string

@@ -304,17 +312,23 @@ // padding-block

m?: number | string
// margin-top
marginTop?: number | string
// margin-top
mt?: number | string
// margin-bottom
marginBottom?: number | string
// margin-bottom
mb?: number | string
// margin-left
marginLeft?: number | string
// margin-left
ml?: number | string
// margin-right
marginRight?: number | string
// margin-right
mr?: number | string
// margin-inline
marginInline?: number | string
// margin-inline
mx?: number | string
// margin-block
marginBlock?: number | string

@@ -329,2 +343,3 @@ // margin-block

fs?: string | number
// line-height
lineHeight?: string | number

@@ -335,2 +350,3 @@ // line-height

color?: string
// background
background?: Property.Background

@@ -347,4 +363,5 @@ // background

thin?: boolean
// font-weight
fontWeight?: Property.FontWeight
// fontWeight
// font-weight
fw?: Property.FontWeight

@@ -354,9 +371,9 @@ // border, border-width, border-color

// grid-template-columns
tempColumns?: string
tempColumns?: string | number
// grid-template-columns
gtc?: string
gtc?: string | number
// grid-template-rows
tempRows?: string
tempRows?: string | number
// grid-template-rows
gtr?: string
gtr?: string | number
// text-align

@@ -371,8 +388,11 @@ textAlign?: Property.TextAlign

t?: string | number
// right
right?: string | number
// right
r?: string | number
// bottom
bottom?: string | number
// bottom
b?: string | number
// left
left?: string | number

@@ -379,0 +399,0 @@ // left

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc