MCPcopy
hub / github.com/jlmakes/scrollreveal / applyStyle

Function applyStyle

src/instance/functions/style.js:226–233  ·  view source on GitHub ↗
(el, declaration)

Source from the content-addressed store, hash-verified

224 * @param {string} [declaration] Styles to apply.
225 */
226export function applyStyle (el, declaration) {
227 declaration.split(';').forEach(pair => {
228 const [property, ...value] = pair.split(':')
229 if (property && value) {
230 el.style[property.trim()] = value.join(':')
231 }
232 })
233}
234

Callers 6

initializeFunction · 0.90
triggerRevealFunction · 0.90
triggerResetFunction · 0.90
revealFunction · 0.90
destroyFunction · 0.90
cleanFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected