ixfx
    Preparing search index...

    Function getComputedPixels

    • Returns the computed measurements of CSS properties via getComputedStyle.

      const v = getComputedPixels(`#some-el`, `borderTopWidth`, `borderLeftWidth`);
      v.borderTopWidth; // number
      b.borderLeftWidth; // number

      Throws an error if value from getComputedStyle is not a string or does not end in 'px'.

      Type Parameters

      • Textendsreadonly (keyof CSSStyleDeclaration)[]

      Parameters

      • elOrQuery: string | HTMLElement
      • ...properties: T

      Returns ComputedPixelsMap<T>