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

Callers 1

serializeCSSFunction · 0.85

Calls 1

Tested by

no test coverage detected