Answer the question
In order to leave comments, you need to log in
Is it possible to create a directive like v-widthAsChild.tovmin()?
Hello, I need something like an additional method to the directive, almost like a prototype, that is, without the tovmin method, the directive will set the width of the element to the width of the child using
el.style.width = getComputedStyle(el.firstChild).getPropertyValue(
"width"
);
el.style.width = 100 * parseInt( getComputedStyle(el.firstChild).getPropertyValue(
"width"
) ) / getMinSide() + "vmin";
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question