From 62575d110c07123e71f7f1d6f88c209167447cd0 Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Sun, 7 Sep 2014 16:13:02 +0200 Subject: [PATCH] Start writing doc --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9168520..1a50a39 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,31 @@ Results in: ### gradient.parse -Accepts the gradient definitions as it is declared in the `background-image` and returns an AST `object`. +Accepts the gradient definitions as it is declared in `background-image` and returns an AST `object`. + +## AST + +### Common properties + +All nodes have the following properties. + +#### type + +`String`. The possible values are the ones listed in the Types section bellow. + +### Types + +The available values of `node.type` are listed below, as well as the available properties of each node (other than the common properties listed above). + +### linear-gradient + +- orientation: `Object` possible types `directional` or `angular`. +- colorStops: `Array` of color stops of type `literal`, `hex`, `rgb`, or `rgba`. + +### repeating-linear-gradient + +- orientation: `Object` possible types `directional` or `angular`. +- colorStops: `Array` of color stops of type `literal`, `hex`, `rgb`, or `rgba`. ## License