injectStyles function

Last updated: 2026-03-05T12:56:18.445Z

Metrics

LOC: 23 Complexity: 2 Params: 0

Signature

injectStyles(): : void

Source Code

function injectStyles(): void {
  if (document.getElementById("fill-all-effect-spotlight-styles")) return;
  const style = document.createElement("style");
  style.id = "fill-all-effect-spotlight-styles";
  style.textContent = `
    #${OVERLAY_ID} {
      position: fixed;
      inset: 0;
      z-index: 2147483644;
      pointer-events: none;
      transition: opacity 300ms ease;
    }
    #${HOLE_ID} {
      position: fixed;
      z-index: 2147483645;
      pointer-events: none;
      border-radius: 8px;
      box-shadow: 0 0 0 4px rgba(255,255,255,0.6), 0 0 0 8px rgba(255,255,255,0.15);
      transition: all 300ms ease;
    }
  `;
  document.head.appendChild(style);
}

Dependencies (Outgoing)

graph LR injectStyles["injectStyles"] SpotlightEffect["SpotlightEffect"] injectStyles -->|uses| SpotlightEffect style injectStyles fill:#dbeafe,stroke:#2563eb,stroke-width:2px click injectStyles "e97e8d96c98fbc38.html" click SpotlightEffect "18dcf6391838edb7.html"
TargetType
SpotlightEffect uses

Impact (Incoming)

graph LR injectStyles["injectStyles"] initFieldIcon["initFieldIcon"] showCaption["showCaption"] applyLabelEffect["applyLabelEffect"] applyPinEffect["applyPinEffect"] applySpotlightEffect["applySpotlightEffect"] initFieldIcon -->|uses| injectStyles showCaption -->|calls| injectStyles applyLabelEffect -->|calls| injectStyles applyPinEffect -->|calls| injectStyles applySpotlightEffect -->|calls| injectStyles style injectStyles fill:#dbeafe,stroke:#2563eb,stroke-width:2px click injectStyles "e97e8d96c98fbc38.html" click initFieldIcon "fcc910dd0c6d49b0.html" click showCaption "bc25f610ecfb5828.html" click applyLabelEffect "cb3df1e3c180daee.html" click applyPinEffect "fad09edaf87b170e.html" click applySpotlightEffect "ed098e44a2649922.html"