Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "frontend-packages/headless-content-unblocker/src/visual/probablyResetParentContainer"

Index

Variables

Const KNOWN_RATIO_CLASSES

KNOWN_RATIO_CLASSES: string[] = [// General"-aspect-ratio",// Gutenberg"wp-block-embed__wrapper",// Cornerstone"x-frame-inner",// Fusion"fusion-video",// Oxygen"video-wrapper"]

Const MEMORIZE_OLD_STYLE

MEMORIZE_OLD_STYLE: "consent-cb-memo-style" = "consent-cb-memo-style"

Functions

isKnownRatioClass

  • isKnownRatioClass(element: HTMLElement): boolean
  • Parameters

    • element: HTMLElement

    Returns boolean

isPotentialVisualWithinResponsiveContainer

  • isPotentialVisualWithinResponsiveContainer(node: HTMLElement): boolean
  • Example: Vimeo responsive video.

    <div style="padding:56.25% 0 0 0;position:relative;">
     <iframe style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
    </div>
    

    Example 2: Oxygen responsive video wrapper

    <div style="aspect-ratio:16/9">
     <iframe></iframe>
    </div>
    

    Parameters

    • node: HTMLElement

    Returns boolean

probablyResetParentContainerForVisual

  • probablyResetParentContainerForVisual(contentBlocker: HTMLElement, state: boolean): void
  • Modify parent element with some styles, e. g. Elementor puts some padding into it. We need to enforce the style via inline-style because some themes use !important in their classes, too.

    Parameters

    • contentBlocker: HTMLElement
    • state: boolean

      If true, the reset-style will be forced and vice-versa

    Returns void

Object literals

Const RESET_STYLE

RESET_STYLE: object

width

width: string = "100%"

Const RESET_STYLE_IMPORTANT

RESET_STYLE_IMPORTANT: object

aspect-ratio

aspect-ratio: string = "initial"

box-sizing

box-sizing: string = "border-box"

height

height: string = "auto"

max-height

max-height: string = "initial"

padding

padding: number = 0

Generated using TypeDoc