Commons

Commons is the abstract base component behind every section in this library. It is never used as asectionTypeof its own; instead every section manifest listscommonsin itsrequiresarray and extends its fields ("$extends": ["commons"]), inheriting the universal section wrapper system:

  • Container: constrain a section to the content max width withinContainer
  • Spacing: remove default margins and padding per edge withnoMargin/noPadding
  • Background: color, image, light/dark overlay screens, and dark-theme text
  • Animation: fade sections in on scroll withisAnimated

Because every section shares this wrapper, all sections have consistent, predictable spacing and background behavior, configured through the samecontainerFieldsobject.

Configuration

Every section supports the common properties. They are configured on the section entry itself and through thecontainerFieldsobject:

yaml
- sectionType: any-section
  containerTag: section # section, article, aside, or div
  classes: ''
  id: ''
  isDisabled: false
  containerFields:
    inContainer: true # constrain to container max width
    isAnimated: true # fade in on scroll
    noMargin:
      top: false
      bottom: false
    noPadding:
      top: false
      bottom: false
    background:
      isDark: false # use light text on dark background
      color: 'var(--color-background-light)'
      image: '/assets/images/sample12.jpg'
      imageScreen: 'none' # light, dark, none

Configuration Options

Section Properties

PropertyTypeRequiredDescription
containerTagstringNoHTML tag for the section wrapper:section,article,aside, ordiv
classesstringNoAdditional CSS classes for the wrapper
idstringNoSection ID, usable as an anchor target
isDisabledbooleanNoExcludes the section from the build whentrue

Container Fields

PropertyTypeRequiredDescription
inContainerbooleanNoAdds.in-containerto constrain the section to the max content width
isAnimatedbooleanNoAdds.is-animatedfor the fade-in-on-scroll effect
noMargin.top/noMargin.bottombooleanNoRemove the default section margins per edge
noPadding.top/noPadding.bottombooleanNoRemove the default section padding per edge
background.colorstringNoBackground color (any CSS color, design tokens recommended)
background.imagestringNoBackground image URL, positioned behind the content
background.imageScreenstringNoOverlay on the background image:light,dark, ornone
background.isDarkbooleanNoAdds.is-darkso text renders in the light color scheme

Notes

  • Commons is markedabstractin its manifest: it contributes styles and fields but is not rendered as a section of its own
  • The commons CSS also provides the responsive content layout (the Every Layout switcher pattern), the.prosemeasure, and utility classes like.sr-only
  • Individual sections can override the layout threshold and gaps via the--thresholdand--content-gapcustom properties in their own CSS