-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(line-ripple): Fix CSP inline style rule #2491
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2491 +/- ##
==========================================
- Coverage 98.87% 98.87% -0.01%
==========================================
Files 102 102
Lines 4073 4072 -1
Branches 510 510
==========================================
- Hits 4027 4026 -1
Misses 46 46
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
`transform-origin: ${xCoordinate}px center`; | ||
|
||
this.adapter_.setAttr('style', attributeString); | ||
this.adapter_.setStyle('transform-origin', `${xCoordinate}px center`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not need to be transformOrigin
to work with element.style[propertyName]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, I guess either one works, even in IE 11.
packages/mdc-line-ripple/README.md
Outdated
@@ -64,7 +64,7 @@ Method Signature | Description | |||
--- | --- | |||
`addClass(className: string) => void` | Adds a class to the root element | |||
`removeClass(className: string) => void` | Removes a class from the root element | |||
`setAttr(attr: string, value: string) => void` | Sets an attribute with a given value on the root element | |||
`setStyle(propertyName: string, value: string) => void` | Sets the style attribute with a given `propertyName` and `value` on the root element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attribute -> property?
packages/mdc-line-ripple/adapter.js
Outdated
@@ -47,11 +47,11 @@ class MDCLineRippleAdapter { | |||
hasClass(className) {} | |||
|
|||
/** | |||
* Sets an attribute with a given value on the line ripple element. | |||
* @param {string} attr | |||
* Sets the style for a given attribute with a given value on the line ripple element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attribute -> property?
Fixes: #2292