Refactor
This commit is contained in:
parent
cae89479ff
commit
2d149e2266
|
@ -29,6 +29,8 @@ module.exports = (function() {
|
||||||
radialGradient: /^radial\-gradient/i,
|
radialGradient: /^radial\-gradient/i,
|
||||||
repeatingRadialGradient: /^repeating\-radial\-gradient/i,
|
repeatingRadialGradient: /^repeating\-radial\-gradient/i,
|
||||||
sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,
|
sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,
|
||||||
|
extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
|
||||||
|
positionKeywords: /^(left|center|right|top|bottom)/i,
|
||||||
pixelValue: /^([0-9]+)px/,
|
pixelValue: /^([0-9]+)px/,
|
||||||
percentageValue: /^([0-9]+)\%/,
|
percentageValue: /^([0-9]+)\%/,
|
||||||
emValue: /^([0-9]+)em/,
|
emValue: /^([0-9]+)em/,
|
||||||
|
@ -199,7 +201,7 @@ module.exports = (function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchExtentKeyword() {
|
function matchExtentKeyword() {
|
||||||
return match('extent-keyword', /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/, 1);
|
return match('extent-keyword', tokens.extentKeywords, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchAtPosition() {
|
function matchAtPosition() {
|
||||||
|
@ -306,7 +308,7 @@ module.exports = (function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchPositionKeyword() {
|
function matchPositionKeyword() {
|
||||||
return match('positionKeyword', /^(left|center|right|top|bottom)/i, 1);
|
return match('positionKeyword', tokens.positionKeywords, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchLength() {
|
function matchLength() {
|
||||||
|
|
Loading…
Reference in a new issue