Content Width Constrained
Validates that main content containers constrain max-width to keep prose readable: ≤ 720px (~75ch) for prose, ≤ 1280px for general content.…
$ aoe install @community/check-content-width-constrained Projection
Always in _index.xml · the agent never has to ask for this.
ContentWidthConstrained [check] v1.0.0
Validates that main content containers constrain max-width to keep prose readable: ≤ 720px (~75ch) for prose, ≤ 1280px for general content. Unconstrained containers stretch text across full 1440+ viewports, breaking the 45–75 CPL rule.
Loaded when retrieval picks the atom as adjacent / supporting.
ContentWidthConstrained [check] v1.0.0
Validates that main content containers constrain max-width to keep prose readable: ≤ 720px (~75ch) for prose, ≤ 1280px for general content. Unconstrained containers stretch text across full 1440+ viewports, breaking the 45–75 CPL rule.
signature: (html: string, css: string, context?: object) -> CheckResult
predicate: // Main content containers (
// Prose containers should be tighter isProse = /prose|article/.test(c.className) || c.tagName === 'ARTICLE' limit = isProse ? PROSE_MAX_PX : CONTENT_MAX_PX if maxPx > limit: yield { selector: cssPath(c), fail: 'max-width-too-wide', actual: maxPx, max: limit, isProse }
Meta
- License: Apache-2.0
- License Provenance: package-authorship-claim
Validates
@community/rule-content-width-constrained
Severity
medium
Failure Message Template
Container '{selector}' is {actual}px wide — exceeds {max}px max. Add max-width: {max}px; margin-inline: auto; (or max-width: 65ch for prose).
Evaluation Method
automated
Tools
- playwright
- puppeteer
- postcss
False Positive Rate
medium
Loaded when retrieval picks the atom as a focal / direct hit.
ContentWidthConstrained [check] v1.0.0
Validates that main content containers constrain max-width to keep prose readable: ≤ 720px (~75ch) for prose, ≤ 1280px for general content. Unconstrained containers stretch text across full 1440+ viewports, breaking the 45–75 CPL rule.
signature: (html: string, css: string, context?: object) -> CheckResult
predicate: // Main content containers (
// Prose containers should be tighter isProse = /prose|article/.test(c.className) || c.tagName === 'ARTICLE' limit = isProse ? PROSE_MAX_PX : CONTENT_MAX_PX if maxPx > limit: yield { selector: cssPath(c), fail: 'max-width-too-wide', actual: maxPx, max: limit, isProse }
Meta
- License: Apache-2.0
- License Provenance: package-authorship-claim
Validates
@community/rule-content-width-constrained
Severity
medium
Failure Message Template
Container '{selector}' is {actual}px wide — exceeds {max}px max. Add max-width: {max}px; margin-inline: auto; (or max-width: 65ch for prose).
Evaluation Method
automated
Tools
- playwright
- puppeteer
- postcss
False Positive Rate
medium
Relations
related: [@community/rule-content-width-constrained, @community/check-line-length-optimal]
Meta
- License: Apache-2.0
- License Provenance: package-authorship-claim
Validates
@community/rule-content-width-constrained
Severity
medium
Failure Message Template
Container '{selector}' is {actual}px wide — exceeds {max}px max. Add max-width: {max}px; margin-inline: auto; (or max-width: 65ch for prose).
Evaluation Method
automated
Tools
- playwright
- puppeteer
- postcss
False Positive Rate
medium
Source
aoe-engine/examples/frontend-design/primes/compiled/@community/check-content-width-constrained/atom.yaml