UNPKG

linear-gradient-parser

Version:

Parses a SVG linear gradient string / parsed JSON into css background image property

24 lines (23 loc) 409 B
/** * HTML attributes mapping */ export const ATTRIBUTES = { X1: 'x1', X2: 'x2', Y1: 'y1', Y2: 'y2', STYLE: 'style', STOP_COLOR: 'stop-color', STOP_OPACITY: 'stop-opacity', OFFSET: 'offset' }; /** * Linear gradient position attributes * @type {String[]} */ export const POSITION_ATTRIBUTES = [ ATTRIBUTES.X1, ATTRIBUTES.X2, ATTRIBUTES.Y1, ATTRIBUTES.Y2 ];