Skip to content

Commit

Permalink
Merge pull request #666 from textioHQ/topic-property-normalize
Browse files Browse the repository at this point in the history
Correctly handle "html style" property names
  • Loading branch information
Rycochet authored Aug 13, 2016
2 parents 0a64ebb + 5395a11 commit 550b716
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions velocity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2770,7 +2770,7 @@ return function (global, window, document, undefined) {
colorRed, colorGreen, and colorBlue RGB component tweens into the propertiesMap (which Velocity understands) and remove the shorthand property. */
$.each(propertiesMap, function(property, value) {
/* Find shorthand color properties that have been passed a hex string. */
if (RegExp("^" + CSS.Lists.colors.join("$|^") + "$").test(property)) {
if (RegExp("^" + CSS.Lists.colors.join("$|^") + "$").test(CSS.Names.camelCase(property))) {
/* Parse the value data for each shorthand. */
var valueData = parsePropertyValue(value, true),
endValue = valueData[0],
Expand All @@ -2795,7 +2795,7 @@ return function (global, window, document, undefined) {
dataArray.push(startValueRGB[i]);
}

propertiesMap[property + colorComponents[i]] = dataArray;
propertiesMap[CSS.Names.camelCase(property) + colorComponents[i]] = dataArray;
}

/* Remove the intermediary shorthand property entry now that we've processed it. */
Expand Down Expand Up @@ -3899,4 +3899,4 @@ return function (global, window, document, undefined) {

/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent.
Velocity, however, doesn't make this distinction. Thus, converting to or from the % unit with these subproperties
will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */
will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */

0 comments on commit 550b716

Please sign in to comment.