(style: Record<string, string>)
| 530 | } |
| 531 | |
| 532 | function resolveGradientBorder(style: Record<string, string>): GradientBorderSpec | null { |
| 533 | const gradient = extractLeadingGradient(style['border-image'] ?? '') |
| 534 | if (!gradient) return null |
| 535 | |
| 536 | const borderWidth = getBorderWidth(style) |
| 537 | if (!borderWidth || isZeroBorderWidth(borderWidth)) return null |
| 538 | |
| 539 | const preserveBorder = !hasOverflowClipping(style) |
| 540 | const inset = preserveBorder |
| 541 | ? (negateLengthLiteral(borderWidth) ?? `calc(-1 * ${borderWidth})`) |
| 542 | : '0' |
| 543 | |
| 544 | return { |
| 545 | gradient, |
| 546 | borderWidth, |
| 547 | preserveBorder, |
| 548 | inset |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | function buildGradientBorderBaseStyle( |
| 553 | style: Record<string, string>, |
no test coverage detected