Skip to main content
Cornell University

Cornell Design System Documentation

Custom Development Team

  • Home
  • Template Structure
    • Template Structure Overview
    • Band (Layer 1)
    • Region (Layer 2)
    • Container (Layer 3)
    • Layout (Layer 4)
    • Section (Layer 5)
    • Block and Content (Layer 6)
  • Landmarks
    • Landmarks Overview
    • Footer
    • Header
    • Main content
    • Navigation
  • Components
    • Components Overview
    • Blockquote
    • Button
    • Checkboxes
    • Fieldset
    • Form inputs (other)
    • Form inputs (text)
    • Horizontal rule
    • List
    • Panel
    • Table
  • Patterns
    • Patterns Overivew
    • Accordion
    • Card
    • Tablist
  • Typography
    • Fonts
    • Headings
    • Icons
    • Images
    • Text and color
  • Development
    • Development Overview
    • Filters

On this page

  1. Code
    • Region Section (if not in a sidebar region)
    • Sidebar Section (if in a sidebar region)
    • Example Sidebar and Article
  2. Classes
    • {sidebar-type}
    • {sidebar-placement}

Section (Layer 5)

Sections are used to contain and position components and content. Generally, all content should be wrapped in a section. Sections are also necessary to position content within a column layout.

The structure of a Section is different depending on the parent elements.

Code

Region Section (if not in a sidebar region)

<div class="section">
    <!-- Component or Content -->
</div>

Sidebar Section (if in a sidebar region)

<div class="{sidebar-type} {sidebar-placement}">
    <!-- Component or Content -->
</div>

Example Sidebar and Article

<div class="container">
    <div class="sidebar sidebar-primary">
        <!-- Sidebar content, top -->
    </div>
    <div class="article">
        <!-- Main Content -->
    </div>
</div>

Classes

{sidebar-type}

Defines the location of the section within the main content area.

For accessibility purposes, create the content in the correct reading order in DOM. Use the correct class to then position the element in the appropriate location. Do not create a scenario where the user’s focus visually flips between the sidebar area and the article area.

Class Description
Default (no class) Warning: Having no classes is not intended behavior. It will cause the block to position itself in the grid inappropriately.
.article This section of content will populate in the main content area of this region. You may only have one of these.
.sidebar This section of content will populate in the sidebar.

{sidebar-placement}

Controls the placement of this container in the provided CSS Grid for sidebars. Requires the class .sidebar to be utilized.

Class Description
Default (no class) Keep this class empty if your section has the .article class. Otherwise, you must use one of the options below.
.sidebar-priority This block of content will populate in the sidebar at the top. You may only have one of these.
.sidebar-secondary This block of content will populate in the sidebar, below the priority sidebar. You may only have one of these.

Footer Content

This documentation for CDS was built using MkDocs.