Gradient Recipes
Gradient recipes provide utility patterns for creating CSS gradients in Etch. All gradient recipes use CSS custom properties for colors and stops, making them easy to customize.
-
gradient-linear: Creates a linear gradient with a default 180deg direction. Uses
--color-1and--color-2custom properties for the gradient colors. -
gradient-radial: Creates a radial gradient in a circular shape. Uses
--color-1and--color-2custom properties for the gradient colors. -
gradient-conic: Creates a conic gradient starting from 0deg. Uses
--color-1and--color-2custom properties for the gradient colors. -
gradient-sharp: Creates a linear gradient with a sharp transition at a specified stop point. Uses
--color-1,--color-2, and--stopcustom properties. The--stopproperty controls where the color transition occurs (default: 50%). -
gradient-fade: Creates a linear gradient that fades from a color to transparent. Uses
--color-1custom property for the starting color. -
gradient-vignette: Creates a radial gradient vignette effect that transitions from transparent in the center to a color at the edges. Uses
--color-1and--stopcustom properties. The--stopproperty controls the size of the transparent center (default: 50%). -
gradient-text: Creates a gradient text effect using background-clip. Uses
--color-1and--color-2custom properties for the gradient colors. This recipe sets the text color to transparent and applies the gradient as the background. -
gradient-border: Creates a gradient border effect using a double background technique. Uses
--color-1for the background color, and--color-2and--color-3for the border gradient colors. The border width defaults to 2px.