(el, prop, val)
| 84 | |
| 85 | |
| 86 | function css(el, prop, val) { |
| 87 | let style = el && el.style; |
| 88 | |
| 89 | if (style) { |
| 90 | if (val === void 0) { |
| 91 | if (document.defaultView && document.defaultView.getComputedStyle) { |
| 92 | val = document.defaultView.getComputedStyle(el, ''); |
| 93 | } |
| 94 | else if (el.currentStyle) { |
| 95 | val = el.currentStyle; |
| 96 | } |
| 97 | |
| 98 | return prop === void 0 ? val : val[prop]; |
| 99 | } |
| 100 | else { |
| 101 | if (!(prop in style) && prop.indexOf('webkit') === -1) { |
| 102 | prop = '-webkit-' + prop; |
| 103 | } |
| 104 | |
| 105 | style[prop] = val + (typeof val === 'string' ? '' : 'px'); |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | function matrix(el, selfOnly) { |
| 111 | let appliedTransforms = ''; |
no outgoing calls
no test coverage detected