Update README with more docs
This commit is contained in:
parent
62575d110c
commit
59bb875120
45
README.md
45
README.md
|
@ -70,6 +70,51 @@ The available values of `node.type` are listed below, as well as the available p
|
|||
- orientation: `Object` possible types `directional` or `angular`.
|
||||
- colorStops: `Array` of color stops of type `literal`, `hex`, `rgb`, or `rgba`.
|
||||
|
||||
### radial-gradient
|
||||
|
||||
- orientation: `Array` or `undefined`. `Array` of possible types `shape`, `default-radial`.
|
||||
- colorStops: `Array` of color stops of type `literal`, `hex`, `rgb`, or `rgba`.
|
||||
|
||||
### repeating-radial-gradient
|
||||
|
||||
- orientation: `Array` or `undefined`. `Array` of possible types `shape`, `default-radial`.
|
||||
- colorStops: `Array` of color stops of type `literal`, `hex`, `rgb`, or `rgba`.
|
||||
|
||||
### directional
|
||||
|
||||
- value: `String` possible values `left`, `top`, `bottom`, `right`.
|
||||
|
||||
### angular
|
||||
|
||||
- value: `Number` integer number.
|
||||
|
||||
### literal
|
||||
|
||||
- value: `String` literal name of the color.
|
||||
|
||||
### hex
|
||||
|
||||
- value: `String` hex value.
|
||||
|
||||
### rgb
|
||||
|
||||
- value: `Array` of length 3 of `Number`'s.
|
||||
|
||||
### rgba
|
||||
|
||||
- value: `Array` of length 4 or `Number`'s.
|
||||
|
||||
### shape
|
||||
|
||||
- style: `Object` or `undefined` possible types `extent-keyword`, `px`, `em`, `%`, or `positioning-keyword`.
|
||||
- value: `String` possible values `ellipse` or `circle`.
|
||||
|
||||
### default-radial
|
||||
|
||||
- at: `Object` of attributes:
|
||||
- x: `Object` possible types `extent-keyword`, `px`, `em`, `%`, or `positioningKeyword`.
|
||||
- y: `Object` possible types `extent-keyword`, `px`, `em`, `%`, or `positioningKeyword`.
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
|
|
@ -171,7 +171,7 @@ module.exports = (function() {
|
|||
var defaultPosition = matchPositioning();
|
||||
if (defaultPosition) {
|
||||
radialType = {
|
||||
type: 'default',
|
||||
type: 'default-radial',
|
||||
at: defaultPosition
|
||||
};
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ module.exports = (function() {
|
|||
var ellipse = match('shape', /^(ellipse)/i, 0);
|
||||
|
||||
if (ellipse) {
|
||||
ellipse.style = matchExtentKeyword() || matchDistance();
|
||||
ellipse.style = matchDistance() || matchExtentKeyword();
|
||||
}
|
||||
|
||||
return ellipse;
|
||||
|
@ -308,7 +308,7 @@ module.exports = (function() {
|
|||
}
|
||||
|
||||
function matchPositionKeyword() {
|
||||
return match('positionKeyword', tokens.positionKeywords, 1);
|
||||
return match('position-keyword', tokens.positionKeywords, 1);
|
||||
}
|
||||
|
||||
function matchLength() {
|
||||
|
|
Loading…
Reference in a new issue