CSSGradientValue.d.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. import type { CSSKeywordValue } from './CSSKeywordValue';
  2. import type { CSSUnitValue } from './CSSNumericValue';
  3. import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
  4. import type { Nested, ParenLess } from './types';
  5. export interface LinearColorStop {
  6. offset: CSSUnitValue;
  7. color: string;
  8. }
  9. export interface LinearGradient {
  10. angle: CSSUnitValue;
  11. steps: LinearColorStop[];
  12. }
  13. export interface RadialGradient {
  14. cx: CSSUnitValue;
  15. cy: CSSUnitValue;
  16. size?: CSSUnitValue | CSSKeywordValue;
  17. steps: LinearColorStop[];
  18. }
  19. export declare enum GradientType {
  20. Constant = 0,
  21. LinearGradient = 1,
  22. RadialGradient = 2
  23. }
  24. export declare class CSSGradientValue extends CSSStyleValue {
  25. type: GradientType;
  26. value: LinearGradient | RadialGradient;
  27. constructor(type: GradientType, value: LinearGradient | RadialGradient);
  28. clone(): CSSGradientValue;
  29. buildCSSText(n: Nested, p: ParenLess, result: string): string;
  30. getType(): CSSStyleValueType;
  31. }
  32. //# sourceMappingURL=CSSGradientValue.d.ts.map