Files
pbakaus_impeccable/tests/fixtures/antipatterns/partial-component.html
T
Paul BakausandClaude Opus 4.6 ed1579ee37 Skip page-level checks on partials/components
Page-level typography checks (flat hierarchy, single font, overused font)
now only run on files that look like full pages (have <!DOCTYPE, <html>,
or <head> tags). Partials and components still get element-level border
checks.

isFullPage() strips HTML comments before checking to avoid false matches
on prose that mentions tag names.

Added partial-component.html fixture that has Inter, flat sizes, and a
side-tab border — verifies only the border is flagged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:49:32 -07:00

12 lines
619 B
HTML

<!-- This is a partial/component — no DOCTYPE, no <html>, no <head> -->
<!-- Page-level checks (flat hierarchy, single font) should NOT run -->
<!-- But element-level border checks SHOULD still run -->
<div class="card" style="font-family: 'Inter', sans-serif;">
<div style="font-size: 14px; border-left: 4px solid #3b82f6; border-radius: 8px; padding: 1rem; background: white;">
<h3 style="font-size: 16px; font-weight: 600;">Card Title</h3>
<p style="font-size: 15px; color: #6b7280;">Card description with close font sizes.</p>
</div>
</div>
<script src="/js/detect-antipatterns-browser.js"></script>