Developer Reference

Contents

Paste-ready rich text version exported from acora-developer-guide.html. This fragment uses Acora framework classes and excludes the standalone search, tab, sidebar, copy-button, style, and script shell.

Source Map

Use this as the first stop when deciding where a layout behavior belongs. Coresite Default CSS is the authoritative framework layer for this reference; SampleCompany and vendor CSS are not treated as source-of-truth for the layout system.

Area Primary files Owns Developer rule
Token foundation \Source.Site\wwwroot\assets\Source\Sites\Coresite\Templates\Default\Css\Abstracts\Variables.css Breakpoints, spacing, gutters, radii, border widths, transitions, zoom, shadows, colors, box border/card defaults. Prefer adding or changing tokens here before hard-coding values in utility files.
General utilities Css\General\Blocks.css, box borderes.css, Borders.css, Colors*.css, Images.css, Icons.css, Ratios.css Reusable layout helpers and author utility grammar. Keep utilities composable and layer-neutral unless a selector is explicitly bound to a generated DOM layer.
Layout engines Css\General\Columns.css, Css\General\Grids.css, Css\General\PageBodyContent.css Column width algorithms, grid patterns, stack/reverse behavior, content area behavior. Document exact responsive behavior whenever changing layout math.
Collections Css\General\ContentCollections*.css, Components\Widgets\Compilation\_CompilationWidget.cshtml, CompilationWidgetProperties.cs Cards, tiles, masonry, image-left/right layouts, routed item/image/text classes, generated collection DOM. Update CSS and Razor routing together when adding a new prefixed class family.
Sections Components\Sections\SectionProperties.cs, Components\Sections\*\*.cshtml, column section property classes. Page Builder section properties and rendered section/content/column wrappers. Keep author property labels aligned with the layer that receives the class.
CSS compilation Services\CompileCssService.cs, Infrastructure\Website.cs LESS/SCSS conversion, dynamic/global CSS registration, combine/minify behavior, combined file cache helpers. Trace output CSS through registration and combined-file helpers before assuming a selector is absent.

Reference Outputs And Link Contract

The developer guide, author layout reference, style guide, and framework test screens now have separate jobs. Keep that separation intact when adding classes, components, or site-specific examples.

Artifact Link Purpose Developer maintenance rule
Developer guide Acora Developer Guide Source-backed implementation contract for CSS, Razor, routing, test coverage, and reference maintenance. Update this when a framework behavior, generated DOM layer, source path, or documentation workflow changes.
Author layout reference Author Layout Reference Searchable author-facing class guide with examples, layer ownership, gaps, and links to tests and recipes. Update this whenever an author-facing class, safe-use rule, or replacement pattern changes.
Style guide recipes Style guide overview Site-specific recipes for approved combinations such as feature blocks, CTA bands, accordions, tabs, tables, and collections. Update this when a site-specific recipe or author-approved composition changes.
Function test screens Function test screen index Links to live `/test-area` screens that demonstrate framework functions and variants. Add or update a test screen when a visual framework function changes, even if the site recipe does not.
Sync rule: for any author-visible layout change, update the source file, the relevant `/test-area` function screen, the author reference, the style-guide recipe if the pattern is site-specific, and this developer guide if the implementation contract changed.

Runtime CSS Pipeline

The CSS service is not just a static file list. It can convert preprocessors, register local/global/module CSS, combine files, compact/minify output, and reuse combined files when content has not changed.

1. Source CSS /assets/Source/Sites/{site}/Templates/{template}/Css
2. Optional preprocessing ConvertLessToCss and ConvertScssToCss
3. Registration RegisterLocalCss, RegisterGlobalCss, RegisterDynamicCss, RegisterModuleCss
4. Collection Media type and collection prefix determine grouping.
5. Combined output Website.GetCombinedFileUrl, CombinedFilesIsModified, compacted CSS.
Important: when a selector appears missing in the browser, check whether it was excluded, registered as local CSS, grouped under another collection prefix, compacted into a combined file, or overridden by later template/custom/module CSS.
CSS registration landmarks
CompileCssService
  ConvertLessToCss / ConvertScssToCss
  RegisterLocalCss(strUrl, strLabel, strMediaType)
  RegisterGlobalCss(strUrl, strCollectionPrefix, strMediaType)
  RegisterDynamicCss(strTopLevelUrl, strCssFilePrefix)
  RegisterModuleCss(strTopLevelUrl, strCssFilePrefix)

Website
  GetCombinedFileModifiedTime(prefix, location)
  GetCombinedFileUrl(prefix, location)
  GetExistingCombinedFileUrl(prefix, extension, location)
  CombinedFilesIsModified(prefix, location, ref url, newContent)

Section Components And Class Surfaces

Section properties deliberately separate outer section classes from inner content classes and column classes. This is the developer contract that lets author guidance say exactly where a class belongs.

.section Receives SectionProperties.ClassName, section background classes, section background image style, section ID.
.content Receives SectionProperties.ContentClassName, content background classes, content background image style.
.content.cols-2, .content.cols-3, .content.cols-4 Receives ColumnsGutters and fixed column-count wrapper class.
.col Receives Col1ClassName, Col2ClassName, Col3ClassName, Col4ClassName.
Property Rendered layer Good class families Implementation risk
ClassName .section width-screen, section backgrounds, vertical padding/margins. Broad inherited classes such as text-center affect every widget inside.
ContentClassName .content maxwidth-*, content background, content padding, block alignment. Content block should not exceed section width; avoid image-specific collection routing here.
ColumnsGutters .content.cols-N gutters-*, row-gutters-*, border gutter variants. Gutters belong on the wrapper, not individual columns.
ColNClassName .col box border, column background, padding, border, last-child-end, self alignment. Do not add cols-N to individual columns.

Style-Guide Component Contracts

These are the newer site-guide examples that need developer support. Some are direct framework structures, some are style-guide recipe examples, and all now need stable links from the author and developer references.

Pattern Implementation selectors or DOM Primary source Test and recipe links
Subheader feature strip #SubHeader .page-intro, .text, h1.page-title, optional .publish-info, .summary.intro, and optional .image. DefaultPageLayout.css and page template subheader output. Style-guide subheaders. No dedicated `/test-area` subheader screen is currently listed.
Blockquotes, style 1 and style 2 Core blockquote handling plus optional caption using footer or .footer. The style guide demonstrates style-1 and style-2 with and without captions. General\Blockquotes.css; site-specific style examples live in the style guide. Function test; style-guide blockquotes.
Responsive Table 1 <table class="dataTable1 responsive"> with real table headings. Responsive table rules create small-screen row labels from header text or fallback labels. General\Tables.css. Function test; style-guide tables.
Regular accordion .expander-section wrapper, .expander-link heading link, and .expander-content panel. Components\Widgets\ContentExpander\_ContentExpanderWidget.cshtml and Modules\ContentExpander.css. Function test; style-guide expanders.
FAQ expander Same expander structure as regular accordions. FAQ/schema output may include a property="text" wrapper inside .expander-content. Content expander widget plus FAQ/schema integration. FAQ schema test; style-guide FAQ section.
Tabbed content .tabs, ul.tabList, .tabContent, .tab, tabCountN, space-evenly, and hide-first-tab-content-heading. Modules\Tabs.css and Abstracts\Mixins.css. Related function test; style-guide tabs / cycle. No dedicated `/test-area` tabs screen is currently listed.
Cycle content .cycle-slideshow wrapper with slide elements, commonly regular blocks or .box border slides carrying cycle slide classes. Modules\Cycle.css. Function test; style-guide tabs / cycle.
Buttons and links button, link-cta, link-read-more, icon-only, and external/link type handling. General\Buttons.css, General\ColorsButtons.css, General\Icons.css, and link rendering. Button test; link test; style-guide buttons and links.

Compilation Widget Class Routing

The compilation widget parses author-provided classes and routes prefixed families to generated layers. This is why developer changes to collection utility syntax must account for both CSS and Razor routing.

Input class family Transform in _CompilationWidget.cshtml Rendered target Example
No recognized prefix Class remains on strCompilationClasses. .collection.articles cards, tiles, masonry, layout-grid-4
item-* Removes item-. .item.article item-border becomes border on the item.
image-ratio-* Replaces image-ratio- with ratio-. .thumbnail image-ratio-16x9 becomes ratio-16x9.
image-square, image-wide, named image ratio aliases Replaces image- with ratio ratio-. .thumbnail image-wide becomes ratio ratio-wide.
Other image-* Removes image-. .thumbnail image-padding becomes padding on the thumbnail block.
img-* Removes img-. Actual <img> img-width-240px becomes width-240px on the image.
text-* Usually removes text-; preserves text-left, text-center, text-right as full classes. .text text-padding-thick becomes padding-thick on the text block.
title-* Removes title-. .title title-style-h3 becomes style-h3 on title.
read-more-link-*, read-more-* Removes the matching prefix. .read-more > a.link-read-more or .read-more read-more-link-button adds button styling to the link.
Rendered DOM contract
<div class="collection articles cards gutters">
  <div class="content">
    <div class="item article">
      <div class="thumbnail">
        <img src="/image.jpg" alt="..." class="" loading="lazy">
      </div>
      <div class="text">
        <h2 class="title"><a href="/article">Title</a></h2>
        <p class="summary intro">Summary</p>
        <div class="read-more"><a class="link-read-more" href="/article">Read more</a></div>
      </div>
    </div>
  </div>
</div>

Class Grammar For Maintainers

The author-facing grammar depends on predictable prefixes. Avoid adding one-off class names that cannot be routed, searched, or documented consistently.

State prefix

hover-* represents state variants. Keep keyboard parity in mind when changing interactive components.

hover-bga-color-2 hover-coloralt-2 hover-shadow-2

Layer prefix

Collection prefixes are author syntax that route to generated DOM layers.

item-* image-* img-* text-*

Responsive suffix

Responsive utilities use breakpoint suffixes, with -only for range-limited behavior.

-medium -small-only -micro
Naming rule: if the author must know whether the class belongs to an item, image block, actual image, text block, title, or link, use a prefix that mirrors the rendered DOM layer.

Breakpoint Contract

Breakpoint values come from Variables.css, while concrete utility cascade behavior is implemented in utility files such as Ratios.css and Columns.css.

Suffix Utility behavior confirmed in source Only range Developer note
-larger <= 2200px 1537-2200px Utility files also define -huge-only at >= 2201px.
-large <= 1536px 1201-1536px stack-large forces column stacking at this tier.
-medium <= 1200px 901-1200px Default higher column counts reduce to max 3 columns unless stack-none.
-small <= 900px 601-900px Default higher column counts reduce to max 2 columns unless stack-none.
-tiny <= 600px 376-600px Columns stack full width at this tier unless stack-none.
-micro <= 375px No -micro-only pattern confirmed in sampled utility files. Use for the narrowest phone correction only.

Token Scales

The framework uses CSS custom properties as the source of truth for author utility scales. Developer additions should align to these scales unless a component has a deliberate custom design contract.

Family Scale Values confirmed Extension guidance
Margins none to thickest 0px, 0.25em, 0.5em, 0.75em, 1.5em, 3em, 6em, 9em Add semantic scale values only when repeated author demand exists.
Padding/gutters none, micro, thinnest to mega 0px, 5px, 10px, 15px, 20px, 30px, 45px, 60px, 90px, 120px Gutters map to padding values. Keep them synchronized.
Radius rectangle, rounded-*, ellipse, pill 0px, 2px, 3px, 5px, 8px, 12px, 24px, 48px, 50%, 50rem Do not create arbitrary radii in component CSS when a token exists.
Transitions slowest to fastest 2000ms, 1000ms, 500ms, 250ms, 125ms, 75ms, 25ms, all ease-in-out. Hover helper classes should use the transition scale rather than bespoke timings.
Zoom/shadow least to most; shadow-1 to shadow-5 Zoom in: 1.025, 1.05, 1.1, 1.25, 1.5. Shadows are tokenized, with shadow-3 customized in block CSS. Keep transform-origin, overflow, and focus states in mind for zoom effects.

Layout Engines

Columns, grids, and ratio/fill utilities are separate layout engines. Combining them on the same direct children is where most hard-to-debug layout behavior starts.

Engine Source Contract Do not combine with
Columns Columns.css cols-2 to cols-6, layout-N percentage splits, gutters, stack/reverse behavior. Grid classes on the same wrapper when the same direct children are being laid out.
Grids Grids.css layout-grid-1 to layout-grid-6 pattern direct children or collection items. Columns, unless nested on a different layer.
Ratios Ratios.css Frame-based aspect ratios; direct child content fills the frame by default. Unnecessary same-breakpoint fill/cover overrides.
Fill/fit Ratios.css fill/cover use object-fit: cover; fit/contain use object-fit: contain. Fixed width and fixed height together unless the component explicitly owns distortion/cropping.

Safe Extension Patterns

A developer change should preserve author mental models. Add the smallest source-backed extension that fits the existing grammar.

Add a spacing/radius/border scale

  1. Add or adjust the token in Variables.css.
  2. Add utility selectors in the owning general CSS file.
  3. Add responsive suffix variants if the family already supports them.
  4. Update the author and developer references.

Add a collection-targeted helper

  1. Decide target layer: item, image block, actual image, text block, title, or read-more.
  2. Reuse the existing prefix grammar if possible.
  3. Confirm _CompilationWidget.cshtml routes the prefix to the intended layer.
  4. Add CSS only where the routed class will actually appear.

Add a grid pattern

  1. Define direct-child and collection selectors together.
  2. Document item count assumptions, e.g. 4, 6, 9, or 14 item cycle.
  3. Add responsive simplification at 900px and 600px if needed.
  4. Provide an author-facing visual example.

Add a section property

  1. Add it to the correct property class: base section or specific column section.
  2. Label the field by rendered target, not by visual intent alone.
  3. Render it on the correct wrapper in the Razor view.
  4. Verify author documentation layer ownership stays true.

Debugging Workflow

Start from the rendered DOM, then work back to Page Builder properties, Razor routing, CSS selectors, and compiled output.

1. Inspect DOM Identify actual layer: .section, .content, .col, .collection, .thumbnail, img, .text.
2. Confirm route For collections, confirm prefixed classes landed on the expected layer.
3. Inspect computed style Find the winning selector and source file.
4. Check responsive tier Match viewport against -medium, -small, -tiny, -micro.
5. Trace CSS registration If the selector is absent, check registration, combine/minify, and custom/template override layers.
Common collection routing bug
Symptom:
  Author adds img-width-240px but the thumbnail frame does not shrink.

Reason:
  img-width-240px routes to the actual <img>, not the .thumbnail block.

Fix:
  Use image-* classes for the thumbnail frame.
  Use img-* classes only when the actual image element should change.

Compatibility And Avoid List

Do not remove legacy classes just because the author guide discourages them. Mark replacements, preserve behavior where practical, and add migration examples.

Class or pattern Developer handling Replacement direction
box border-wide Keep compatibility unless a migration plan exists. It is documented as deprecated because behavior is fragile. width-screen on section plus maxwidth-* on content block.
cards-padded Prefer targeted text/image padding. Avoid adding new behavior to the broad legacy class. text-padding-* and image-padding-*.
image-contain Document as legacy/avoid when modern fit/contain utilities cover the use case. fit, contain, fill-contain, or routed collection equivalent.
stack-none Supported override, but risky for authors on narrow screens. Prefer explicit stack-large, stack-medium, stack-small, or default stacking.
Duplicate IDs Treat as a content defect and a TOC/search defect. Generate stable unique anchors for reference docs and component examples.
Hover-only behavior Preserve or add focus-visible equivalents for interactive states. Pair hover utilities with accessible focus states and visible text.

Developer Coverage Gaps

These are the current important gaps after adding function-test and recipe links to the author reference. They are developer work items because each gap needs either source-backed tests, a recipe, or a clear decision that it is reference-only.

Gap Current coverage Recommended developer action
Breakpoints and responsive suffixes Author reference has source-backed ranges. Related tests exist on columns, grids, and inline images. Add a dedicated responsive utility test screen that shows -medium, -small, -tiny, -micro, and -only behavior in one place.
Class grammar and collection routing Author and developer guides explain the grammar. Related tests are spread across colors, collections, box borderes, and buttons. Add a grammar/routing test screen showing base, hover, responsive, image-*, img-*, text-*, title-*, and read-more prefixes.
Token scale values References list source values from Variables.css. Visual test coverage is indirect. Add a scale test screen that renders padding, margin, gutters, radius, borders, shadows, zoom, and transition steps.
Ratio, fill, fit, position, and fixed-size precedence Author reference has conflict examples and two ratio examples. Tests are spread across inline images, image captions, collections, and grids. Add a dedicated media-frame test screen for ratio-*, fill, fit, position-*, img-width-*, fixed heights, and invalid combinations.
Layer ownership References include the matrix and Razor/CSS contracts. Visual coverage is indirect. Add a page that renders the same utility on section, content, column, collection, item, image block, actual image, and text block to make ownership visible.
Deprecated / avoid replacements Author reference consolidates avoid items. Existing tests show related functionality but not migration pairs. Add replacement examples for box border-wide, cards-padded, image-contain, broad section text alignment, and box border-for-padding misuse.
Accessibility interaction patterns Typography, links, icons, expanders, FAQ schema, and tables have related tests. There is no single keyboard/focus/hover-only audit screen. Add a compact accessibility test screen covering icon-only, hide-from-sight, focus-visible parity, hover-only meaning, and responsive table labels.
Subheaders and tabbed content test pages Style guide has recipe examples. Listed `/test-area` coverage has cycle content but no dedicated subheader or tabs screen. Add `/test-area/subheaders` and `/test-area/content-elements/tabs` or explicitly document that these are recipe-only examples.

Developer QA Checklist

Use this checklist when changing the layout framework or updating these references.

Source verification

  • Confirm Coresite Default CSS source path exists.
  • Confirm token values in Variables.css.
  • Confirm utility behavior in the owning file, not secondary docs.
  • Confirm Razor DOM output for generated layers.

Reference verification

  • No duplicate IDs.
  • No broken hash links.
  • No broken links to layout-reference.html or style-guide/index.html anchors.
  • Search finds file names, class names, aliases, and examples.
  • Desktop and narrow viewport layouts do not overflow the page shell.

CSS change verification

  • Plain class, responsive suffix, and -only behavior are documented.
  • Layer-targeted collection classes route correctly.
  • Hover behavior has focus-accessible handling where interactive.
  • Deprecated classes keep migration examples.
  • Matching `/test-area` screens are updated when visual framework behavior changes.

Author impact

  • Update author guide examples when developer behavior changes.
  • Update style-guide recipes when approved site-specific combinations change.
  • Update coverage gaps when a missing test or recipe is added.
  • Use author language for Page Builder labels.
  • Keep class grammar predictable and searchable.
  • Document safe replacements for fragile combinations.