Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Don't collapse ad iframes that need height for viewability tracking
CSS that hides/shrinks native ad iframes can break impression-viewable tracking; keep the project's hide-but-trackable pattern instead of setting height to 0.
Bad example
| 1 | .isVarE iframe { |
| 2 | height: 0; /* fix Safari empty iframe stretch */ |
| 3 | } |
Explanation (EN)
A zero-height workaround can break both layout assumptions and the integration's measurement contract.
Objašnjenje (HR)
Good example
| 1 | .isVarE iframe { |
| 2 | /* reuse the hide-but-trackable pattern that preserves measurable height */ |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
For the specific ad integration, verify its documented measurement and empty-frame layout contract before changing iframe geometry across supported browsers.
Exceptions / Tradeoffs (EN)
A measurable height does not prove an ad is actually viewable. Preserve truthful visibility/tracking semantics and use the integration's supported empty/hidden state rather than inventing a universal hidden-but-viewable pattern.