{"record":{"id":"0a6e57a058c36102","repo":"medusajs/medusa","slug":"the-gradient-type-gradient-type-is-not-suppor","errorCode":null,"errorMessage":"The gradient type \"${gradient.type}\" is not supported.","messagePattern":"The gradient type \"(.+?)\" is not supported\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/design-system/toolbox/src/commands/tokens/utils/colors.ts","lineNumber":147,"sourceCode":"  opacity,\n}: CreateLinearGradientComponentProps): CSSProperties {\n  return {\n    backgroundImage: `linear-gradient(${degree}deg, var(${from}), var(${to}))`,\n    opacity: `${opacity}%`,\n  }\n}\n\n/**\n * Get the values of a gradient based on its type.\n * @param gradient\n * @returns\n */\nfunction gradientValues(gradient: PaintGradient) {\n  if (gradient.type === PaintType.GRADIENT_LINEAR) {\n    return linearGradientValues(gradient)\n  }\n\n  logger.warn(`The gradient type \"${gradient.type}\" is not supported.`)\n  return null\n}\n\nexport { colorToRGBA, createLinearGradientComponent, gradientValues }\n","sourceCodeStart":129,"sourceCodeEnd":152,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/design-system/toolbox/src/commands/tokens/utils/colors.ts#L129-L152","documentation":"gradientValues maps a Figma PaintGradient to CSS values. It explicitly handles GRADIENT_LINEAR and for every other gradient paint type (radial, angular, diamond, striped) logs this warning and returns null, so the caller drops that gradient from generated tokens/components.","triggerScenarios":"Processing a PaintGradient with type !== GRADIENT_LINEAR (e.g. GRADIENT_RADIAL) via the colors token utility during token generation.","commonSituations":"Same family as the tokens-command warning: designers adding non-linear gradients to the design system's Figma file; this is the lower-level utility that surfaces it.","solutions":["Convert the Figma gradient to a linear gradient","Add a case for the missing PaintType (radial etc.) returning proper CSS and re-export from utils","Filter non-linear gradient styles out before running token generation"],"exampleFix":"// extending the utility\nfunction gradientValues(gradient: PaintGradient) {\n  if (gradient.type === PaintType.GRADIENT_LINEAR) return linearGradientValues(gradient)\n  if (gradient.type === PaintType.GRADIENT_RADIAL) return radialGradientValues(gradient)\n  logger.warn(`The gradient type \"${gradient.type}\" is not supported.`)\n  return null\n}","handlingStrategy":"type-guard","validationCode":"if (gradient.type !== PaintType.GRADIENT_LINEAR) return null // skip before processing","typeGuard":"const isLinearGradient = (g: PaintGradient): boolean =>\n  g.type === PaintType.GRADIENT_LINEAR","tryCatchPattern":null,"preventionTips":["Filter non-linear gradients from token input before processing","Extend gradientValues when new types are adopted by design"],"tags":["design-system","design-tokens","figma","gradients"],"backgroundTag":"unsupported-token-type","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}