( style: Record<string, string>, spec: GradientBorderSpec )
| 550 | } |
| 551 | |
| 552 | function 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 | |
| 578 | function buildGradientBorderPseudoStyle(spec: GradientBorderSpec): Record<string, string> { |
| 579 | return { |
no test coverage detected