( style: Record<string, string>, spec: GradientBorderSpec )
| 550 | : '0' |
| 551 | |
| 552 | return { |
| 553 | gradient, |
| 554 | borderWidth, |
| 555 | preserveBorder, |
| 556 | inset |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | function 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) { |
no test coverage detected