MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / buildGradientBorderBaseStyle

Function buildGradientBorderBaseStyle

packages/extension/utils/css.ts:552–576  ·  view source on GitHub ↗
(
  style: Record<string, string>,
  spec: GradientBorderSpec
)

Source from the content-addressed store, hash-verified

550}
551
552function buildGradientBorderBaseStyle(
553 style: Record<string, string>,
554 spec: GradientBorderSpec
555): Record<string, string> {
556 const base: Record<string, string> = {}
557
558 for (const [key, value] of Object.entries(style)) {
559 if (!value) continue
560 if (key === 'border-image' || key === 'border-image-slice') continue
561 if (isNonRadiusBorderProperty(key)) continue
562 base[key] = value
563 }
564
565 if (!base.position) {
566 base.position = 'relative'
567 }
568 if (!base.isolation) {
569 base.isolation = 'isolate'
570 }
571 if (spec.preserveBorder) {
572 base.border = `${spec.borderWidth} solid transparent`
573 }
574
575 return base
576}
577
578function buildGradientBorderPseudoStyle(spec: GradientBorderSpec): Record<string, string> {
579 return {

Callers 1

serializeCSSFunction · 0.85

Calls 1

Tested by

no test coverage detected