MCPcopy Index your code
hub / github.com/SortableJS/Sortable / css

Function css

src/utils.js:86–108  ·  view source on GitHub ↗
(el, prop, val)

Source from the content-addressed store, hash-verified

84
85
86function 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
110function matrix(el, selfOnly) {
111 let appliedTransforms = '';

Callers 13

_detectDirectionFunction · 0.90
_hideGhostForTargetFunction · 0.90
_unhideGhostForTargetFunction · 0.90
Sortable.jsFile · 0.90
captureAnimationStateFunction · 0.90
animateFunction · 0.90
matrixFunction · 0.70
getRectFunction · 0.70
getContentRectFunction · 0.70
lastChildFunction · 0.70
setRectFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected