Skip to main content

Patterns

Design Tokens

Core design variables including colors, shadows, spacing, typography, and breakpoints.

Box Shadows

Modern, subtle box shadows using px units with low opacity values. These create depth without overwhelming the design.

Small Shadow
--bs-box-shadow-sm
0 1px 4px rgba(0,0,0,.04)
Default Shadow
--bs-box-shadow
0 2px 12px rgba(0,0,0,.08)
Large Shadow
--bs-box-shadow-lg
0 4px 20px rgba(0,0,0,.12)
Inset Shadow
--bs-box-shadow-inset
inset 0 1px 2px rgba(0,0,0,.06)
View Code
/* Box Shadow Variables */
--bs-box-shadow-sm: 0 1px 4px rgba(0,0,0,.04);
--bs-box-shadow: 0 2px 12px rgba(0,0,0,.08);
--bs-box-shadow-lg: 0 4px 20px rgba(0,0,0,.12);
--bs-box-shadow-inset: inset 0 1px 2px rgba(0,0,0,.06);

/* Usage in CSS */
.my-element {
    box-shadow: var(--bs-box-shadow);
}

/* Bootstrap Utility Classes */
<div class="shadow-sm">Small shadow</div>
<div class="shadow">Default shadow</div>
<div class="shadow-lg">Large shadow</div>

/* Note: Inset shadow has no utility class - use CSS variable directly */
<div style="box-shadow: var(--bs-box-shadow-inset);">Inset shadow</div>

Border Radius

Standard border radius values for consistent rounded corners.

Small 0.25rem
Default 0.375rem
Large 0.5rem
XL 1rem
2XL 2rem
Pill 50rem
View Code
/* Border Radius Variables */
--bs-border-radius-sm: 0.25rem;
--bs-border-radius: 0.375rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-xxl: 2rem;
--bs-border-radius-pill: 50rem;

/* Bootstrap Utilities */
.rounded-0     /* No radius */
.rounded-1     /* Small */
.rounded-2     /* Default */
.rounded-3     /* Large */
.rounded-4     /* XL */
.rounded-5     /* 2XL */
.rounded-pill  /* Pill shape */

Gray Scale

Custom gray palette from light to dark. These are the foundation for neutral colors throughout the theme.

White #fff
Gray 100 #f8f9fa
Gray 200 #e3e4e6
Gray 300 #cacbcc
Gray 400 #b1b2b3
Gray 500 #979899
Gray 600 #7d7f80
Gray 700 #656666
Gray 800 #4c4c4d
Gray 900 #323333
Black #000
View Code
/* Gray Scale Variables */
--bs-white: #fff;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e3e4e6;
--bs-gray-300: #cacbcc;
--bs-gray-400: #b1b2b3;
--bs-gray-500: #979899;
--bs-gray-600: #7d7f80;
--bs-gray-700: #656666;
--bs-gray-800: #4c4c4d;
--bs-gray-900: #323333;
--bs-black: #000;

/* Bootstrap Utilities */
.bg-white, .bg-gray-100, .bg-gray-200, etc.
.text-white, .text-black, .text-muted

Theme Colors

Primary (gray) and secondary (UW Red) brand colors with contextual variants.

Primary

--bs-primary
#656666 (Gray 700)

Secondary

--bs-secondary
#c5050c (UW Red)

Success

--bs-success
#198754

Danger

--bs-danger
#9b0000

Warning

--bs-warning
#ffc107

Info

--bs-info
#036796 (UW Madison Blue)

Light

--bs-light
#e3e4e6

Dark

--bs-dark
#4c4c4d
View Code
/* Theme Color Variables */
--bs-primary: #656666;        /* Gray 700 */
--bs-secondary: #c5050c;      /* UW Red */
--bs-success: #198754;
--bs-danger: #9b0000;
--bs-warning: #ffc107;
--bs-info: #036796;           /* UW Madison Blue */
--bs-light: #e3e4e6;
--bs-dark: #4c4c4d;

/* Bootstrap Utilities */
.bg-primary, .bg-secondary, .bg-success, etc.
.text-primary, .text-secondary, .text-success, etc.
.border-primary, .border-secondary, etc.

Typography Scale

Font size variables using a modular scale based on 1.125rem (18px) base.

XS: The quick brown fox jumps over the lazy dog --bs-font-size-xs (0.84375rem / 13.5px)
SM: The quick brown fox jumps over the lazy dog --bs-font-size-sm (0.984375rem / 15.75px)
Base: The quick brown fox jumps over the lazy dog --bs-font-size-base (1.125rem / 18px)
LG: The quick brown fox jumps over the lazy dog --bs-font-size-lg (1.40625rem / 22.5px)
XL: The quick brown fox jumps over the lazy dog --bs-font-size-xl (1.6875rem / 27px)
XXL: The quick brown fox jumps over the lazy dog --bs-font-size-xxl (2.25rem / 36px)
View Code
/* Font Size Variables */
--bs-font-size-xs: 0.84375rem;    /* 13.5px */
--bs-font-size-sm: 0.984375rem;   /* 15.75px */
--bs-font-size-base: 1.125rem;    /* 18px - Default body text */
--bs-font-size-lg: 1.40625rem;    /* 22.5px */
--bs-font-size-xl: 1.6875rem;     /* 27px */
--bs-font-size-xxl: 2.25rem;      /* 36px */

/* Font Family Variables */
--bs-font-sans-serif: "Red Hat Text", sans-serif;
--bs-font-heading: "Red Hat Display", sans-serif;
--bs-font-monospace: SFMono-Regular, Consolas, Monaco, monospace;

Spacing Scale

Bootstrap's spacing scale from 0 to 5 (in 0.25rem increments). Used for margins and padding utilities.

0 = 0
1 = 0.25rem (4px)
2 = 0.5rem (8px)
3 = 1rem (16px)
4 = 1.5rem (24px)
5 = 3rem (48px)
View Code
/* Spacing Scale */
$spacer: 1rem (16px base)

0 = 0
1 = $spacer * .25    (0.25rem / 4px)
2 = $spacer * .5     (0.5rem / 8px)
3 = $spacer          (1rem / 16px)
4 = $spacer * 1.5    (1.5rem / 24px)
5 = $spacer * 3      (3rem / 48px)

/* Bootstrap Spacing Utilities */
.m-0, .m-1, .m-2, .m-3, .m-4, .m-5    /* Margin all sides */
.mt-*, .mb-*, .ms-*, .me-*             /* Margin specific side */
.mx-*, .my-*                            /* Margin horizontal/vertical */
.p-0, .p-1, .p-2, .p-3, .p-4, .p-5    /* Padding all sides */
.pt-*, .pb-*, .ps-*, .pe-*             /* Padding specific side */
.px-*, .py-*                            /* Padding horizontal/vertical */

/* Gap utilities for flexbox/grid */
.gap-0, .gap-1, .gap-2, .gap-3, .gap-4, .gap-5

Responsive Breakpoints

Bootstrap's responsive breakpoints for mobile-first design.

Breakpoint Class Infix Dimensions CSS Variable
Extra Small None <576px --bs-breakpoint-xs: 0
Small -sm- ≥576px --bs-breakpoint-sm: 576px
Medium -md- ≥768px --bs-breakpoint-md: 768px
Large -lg- ≥992px --bs-breakpoint-lg: 992px
Extra Large -xl- ≥1200px --bs-breakpoint-xl: 1200px
Extra Extra Large -xxl- ≥1400px --bs-breakpoint-xxl: 1400px
View Code
/* Breakpoint Variables */
--bs-breakpoint-xs: 0;
--bs-breakpoint-sm: 576px;
--bs-breakpoint-md: 768px;
--bs-breakpoint-lg: 992px;
--bs-breakpoint-xl: 1200px;
--bs-breakpoint-xxl: 1400px;

/* Responsive Class Examples */
.col-12 .col-sm-6 .col-md-4 .col-lg-3    /* Grid columns */
.d-none .d-md-block                       /* Display utilities */
.text-start .text-md-center               /* Text alignment */
.mb-3 .mb-lg-5                            /* Spacing */

/* Media Query Usage in SCSS */
@include media-breakpoint-up(md) {
    /* Styles for medium and up */
}
@include media-breakpoint-down(lg) {
    /* Styles for large and down */
}

Custom Theme Variables

Additional CSS custom properties specific to the COE theme.

Gradient Overlays

--fade-from-top

Swiper Theme Color

--swiper-theme-color
var(--bs-red) / #c5050c

All Custom Theme Variables

Variable Value Purpose
--fade-from-top linear-gradient(180deg, var(--bs-gray-200), transparent 40%) Fade gradient from top
--fade-from-bottom linear-gradient(0deg, var(--bs-gray-200), transparent 40%) Fade gradient from bottom
--fade-from-both Combined top and bottom gradients Fade from both directions
--color-overlay-black rgba(0, 0, 0, .5) Semi-transparent black overlay
--color-overlay-white hsla(0, 0%, 100%, .5) Semi-transparent white overlay
--swiper-theme-color var(--bs-red) !important Slider navigation/pagination color
--swiper-pagination-bullet-size 16px Slider pagination dot size
View Code
/* Custom Theme Variables (from theme.scss) */
:root {
    --fade-from-top: linear-gradient(180deg, var(--bs-gray-200), transparent 40%);
    --fade-from-bottom: linear-gradient(0deg, var(--bs-gray-200), transparent 40%);
    --fade-from-both: linear-gradient(180deg, var(--bs-gray-200), transparent 40%),
                       linear-gradient(0deg, var(--bs-gray-200), transparent 40%);

    --color-overlay-black: rgba(0, 0, 0, .5);
    --color-overlay-white: hsla(0, 0%, 100%, .5);

    --swiper-theme-color: var(--bs-red) !important;
    --swiper-pagination-bullet-size: 16px;
    --swiper-pagination-bullet-horizontal-gap: 9px;
}

Inspecting CSS Variables

Use browser DevTools to inspect all CSS custom properties available on this page.

How to Inspect CSS Variables:

  1. Open browser DevTools (F12 or right-click → Inspect)
  2. Select the <html> or :root element
  3. Look for the "Styles" or "Computed" tab
  4. Scroll to see all --bs-* and --wp-* variables
  5. Click on any value to edit it live and see changes instantly

Utilities & Backgrounds

Bootstrap utility classes and custom theme background patterns.

Font Size Utilities

Font Size 1 (.fs-1) - Largest
Font Size 2 (.fs-2)
Font Size 3 (.fs-3)
Font Size 4 (.fs-4)
Font Size 5 (.fs-5)
Font Size 6 (.fs-6) - Smallest

Display Utilities

Class Effect Responsive Variants
.d-none Hide element .d-{sm,md,lg,xl,xxl}-none
.d-block Display as block .d-{sm,md,lg,xl,xxl}-block
.d-inline Display as inline .d-{sm,md,lg,xl,xxl}-inline
.d-inline-block Display as inline-block .d-{sm,md,lg,xl,xxl}-inline-block
.d-flex Display as flexbox .d-{sm,md,lg,xl,xxl}-flex
.d-grid Display as grid .d-{sm,md,lg,xl,xxl}-grid

Shadow Utilities

.shadow-none
.shadow-sm
.shadow
.shadow-lg

Border Radius Utilities

.rounded-0
.rounded-1
.rounded-2
.rounded-3
.rounded-4
.rounded-5
.rounded-circle
.rounded-pill

Common Spacing Utilities

Pattern: .{property}{sides}-{size}
  • Property: m (margin), p (padding)
  • Sides: t (top), b (bottom), s (start/left), e (end/right), x (horizontal), y (vertical), or blank (all)
  • Size: 0, 1, 2, 3, 4, 5, auto
Margin Examples: .m-0 - No margin .mt-3 - Margin top 1rem .mb-4 - Margin bottom 1.5rem .mx-auto - Horizontal center .my-5 - Vertical margin 3rem
Padding Examples: .p-0 - No padding .pt-3 - Padding top 1rem .pb-4 - Padding bottom 1.5rem .px-3 - Horizontal padding 1rem .py-5 - Vertical padding 3rem
View All Utility Classes
/* Font Size Utilities */
.fs-1, .fs-2, .fs-3, .fs-4, .fs-5, .fs-6

/* Display Utilities */
.d-none, .d-block, .d-inline, .d-inline-block, .d-flex, .d-grid
.d-{breakpoint}-{value}  /* Responsive variants */

/* Shadow Utilities */
.shadow-none, .shadow-sm, .shadow, .shadow-lg

/* Border Radius */
.rounded-0 through .rounded-5
.rounded-circle, .rounded-pill
.rounded-top, .rounded-end, .rounded-bottom, .rounded-start

/* Spacing Utilities */
.m-{0-5}     /* Margin all sides */
.mt-{0-5}    /* Margin top */
.mb-{0-5}    /* Margin bottom */
.ms-{0-5}    /* Margin start (left) */
.me-{0-5}    /* Margin end (right) */
.mx-{0-5}    /* Margin horizontal */
.my-{0-5}    /* Margin vertical */
.mx-auto     /* Center horizontally */

.p-{0-5}     /* Padding all sides */
.pt-{0-5}    /* Padding top */
.pb-{0-5}    /* Padding bottom */
.ps-{0-5}    /* Padding start (left) */
.pe-{0-5}    /* Padding end (right) */
.px-{0-5}    /* Padding horizontal */
.py-{0-5}    /* Padding vertical */

/* Flexbox Utilities */
.d-flex
.flex-row, .flex-column
.flex-wrap, .flex-nowrap
.justify-content-start, -center, -end, -between, -around
.align-items-start, -center, -end, -stretch, -baseline
.gap-{0-5}

/* Grid Utilities */
.d-grid
.gap-{0-5}
.grid-{1-12}-cols

/* Text Utilities */
.text-start, .text-center, .text-end
.text-{color}  /* primary, secondary, success, etc. */
.text-uppercase, .text-lowercase, .text-capitalize
.fw-light, .fw-normal, .fw-bold
.fst-italic, .fst-normal

/* Background Utilities */
.bg-{color}  /* primary, secondary, success, light, dark, etc. */
.bg-transparent, .bg-white

/* Border Utilities */
.border, .border-{0-5}
.border-top, .border-end, .border-bottom, .border-start
.border-{color}  /* primary, secondary, etc. */

Custom Background Classes

Theme-specific background patterns and gradients. These classes are defined in theme.scss.

Pattern Backgrounds

.bg-diagonal-light
Diagonal stripe pattern on light gray
.bg-dot-light
Dot pattern on light gray
.bg-grid-light
CSS grid pattern
.bg-plus-light
Plus sign pattern
.bg-pattern-primary
Gray with decorative pattern
.bg-pattern-secondary
Red with decorative pattern

Gradient Backgrounds

.bg-gradient-secondary
Red gradient (top to bottom)
.bg-gradient-secondary-lr
Red gradient (left to right)
.bg-gradient-primary
Gray gradient (top to bottom)
.bg-gradient-primary-lr
Gray gradient (left to right)

Light Gray Gradients (Fade to White)

.bg-light-grey-tb
Top to bottom fade
.bg-light-grey-lr
Left to right fade
.bg-light-grey-bt
Bottom to top fade
.bg-light-grey-rl
Right to left fade

Special Background Effects

.bg-diagonal-red-trans
Diagonal red with transparency effect
View Background Class Reference
/* Pattern Backgrounds */
.bg-diagonal-light       /* Diagonal stripes on light gray */
.bg-dot-light           /* Dot pattern on light gray */
.bg-grid-light          /* Grid pattern */
.bg-plus-light          /* Plus sign pattern */
.bg-pattern-primary     /* Gray with SVG pattern */
.bg-pattern-secondary   /* Red with SVG pattern */

/* Gradient Backgrounds */
.bg-gradient-secondary      /* Red gradient (top to bottom) */
.bg-gradient-secondary-lr   /* Red gradient (left to right) */
.bg-gradient-primary        /* Gray gradient (top to bottom) */
.bg-gradient-primary-lr     /* Gray gradient (left to right) */

/* Light Gray Gradients */
.bg-light-grey-tb       /* Top to bottom fade */
.bg-light-grey-lr       /* Left to right fade */
.bg-light-grey-bt       /* Bottom to top fade */
.bg-light-grey-rl       /* Right to left fade */

/* Special Effects */
.bg-diagonal-red-trans  /* Diagonal red with transparency */

/* Usage Examples */
<div class="bg-pattern-secondary text-white p-5">
    Hero section with red pattern background
</div>

<section class="bg-gradient-primary text-white py-5">
    Content with gray gradient
</section>

UI Components

Reusable interface components with code examples and usage guidelines.

Headings (h1-h6)

All HTML headings using semantic elements and Bootstrap's font scale.

Heading 1 - Engineering Excellence

Heading 2 - Research & Innovation

Heading 3 - Academic Programs

Heading 4 - Student Success

Heading 5 - Campus Life
Heading 6 - Contact Information
View Code
<h1>Heading 1 - Engineering Excellence</h1>
<h2>Heading 2 - Research & Innovation</h2>
<h3>Heading 3 - Academic Programs</h3>
<h4>Heading 4 - Student Success</h4>
<h5>Heading 5 - Campus Life</h5>
<h6>Heading 6 - Contact Information</h6>

Display Headings

Larger, more impactful headings for hero sections and landing pages.

Display 1

Display 2

Display 3

Display 4

View Code
<h1 class="display-1">Display 1</h1>
<h1 class="display-2">Display 2</h1>
<h1 class="display-3">Display 3</h1>
<h1 class="display-4">Display 4</h1>

Lead Paragraph

Make a paragraph stand out with the .lead class.

The College of Engineering at UW-Madison is a world-renowned institution dedicated to advancing knowledge, innovation, and engineering excellence through groundbreaking research and exceptional education.

View Code
<p class="lead">
    The College of Engineering at UW-Madison is a world-renowned...
</p>

Body Text

Standard paragraph text with optimal line height and spacing.

Our programs span a wide range of disciplines including mechanical engineering, electrical engineering, computer science, chemical engineering, and civil engineering. We are committed to fostering innovation, critical thinking, and collaborative problem-solving.

Through cutting-edge research facilities, industry partnerships, and a diverse community of scholars, we prepare students to become leaders in their fields and make meaningful contributions to society.

View Code
<p>
    Our programs span a wide range of disciplines...
</p>
<p>
    Through cutting-edge research facilities...
</p>

Inline Text Elements

Styling for common inline HTML elements.

You can use the mark tag to highlight text.

This line of text is meant to be treated as deleted text.

This line of text is meant to be treated as no longer accurate.

This line of text is meant to be treated as an addition to the document.

This line of text will render as underlined.

This line of text is meant to be treated as fine print.

This line rendered as bold text.

This line rendered as italicized text.

View Code
<mark>highlight</mark>
<del>deleted text</del>
<s>no longer accurate</s>
<ins>addition to document</ins>
<u>underlined</u>
<small>fine print</small>
<strong>bold text</strong>
<em>italicized text</em>

Text Colors

Contextual text colors using Bootstrap utilities.

Primary text (Gray) - Default body color

Secondary text (Red) - UW-Madison brand color #C5050C

Success text - Positive feedback

Danger text - Errors or warnings

Warning text - Cautionary messages

Info text - Informational messages

Muted text - De-emphasized content

Body secondary text - Subtle contrast

View Code
<p class="text-primary">Primary text</p>
<p class="text-secondary">Secondary text (UW Red)</p>
<p class="text-success">Success text</p>
<p class="text-danger">Danger text</p>
<p class="text-warning">Warning text</p>
<p class="text-info">Info text</p>
<p class="text-muted">Muted text</p>
<p class="text-body-secondary">Body secondary text</p>

Font Weights

Text weight utilities for emphasis.

Light weight text (300)

Normal weight text (400)

Semibold weight text (600)

Bold weight text (700)

View Code
<p class="fw-light">Light weight text</p>
<p class="fw-normal">Normal weight text</p>
<p class="fw-semibold">Semibold weight text</p>
<p class="fw-bold">Bold weight text</p>

Text Alignment

Align text with responsive alignment utilities.

Left aligned text on all viewport sizes.

Center aligned text on all viewport sizes.

Right aligned text on all viewport sizes.

Responsive alignment: left on small, center on medium, right on large viewports.

View Code
<p class="text-start">Left aligned</p>
<p class="text-center">Center aligned</p>
<p class="text-end">Right aligned</p>
<p class="text-sm-start text-md-center text-lg-end">
    Responsive alignment
</p>

Lists

Unordered, ordered, and unstyled list variations.

Unordered List

  • Mechanical Engineering
  • Electrical Engineering
  • Computer Science
  • Chemical Engineering

Ordered List

  1. Research Excellence
  2. Academic Programs
  3. Student Support
  4. Industry Partnerships

Unstyled List

  • Innovation Hub
  • Maker Space
  • Career Services
  • Alumni Network
View Code
<!-- Unordered -->
<ul>
    <li>Mechanical Engineering</li>
    <li>Electrical Engineering</li>
</ul>

<!-- Ordered -->
<ol>
    <li>Research Excellence</li>
    <li>Academic Programs</li>
</ol>

<!-- Unstyled -->
<ul class="list-unstyled">
    <li>Innovation Hub</li>
    <li>Maker Space</li>
</ul>

Blockquote

For quoting blocks of content from another source.

"The University of Wisconsin-Madison is the place where transformative ideas are born and nurtured, shaping the future of engineering and technology."

View Code
<figure>
    <blockquote class="blockquote">
        <p>
            "The University of Wisconsin-Madison..."
        </p>
    </blockquote>
    <figcaption class="blockquote-footer mt-2">
        Dean of Engineering, <cite>Annual Report</cite>
    </figcaption>
</figure>

Line Clamping (Theme Utility)

Custom theme utility for truncating text to a specific number of lines.

2 Lines Max (.max-lines-2)

The College of Engineering offers a comprehensive range of undergraduate and graduate programs designed to prepare students for successful careers in engineering, technology, and research. Our faculty are leaders in their fields.

3 Lines Max (.max-lines-3)

The College of Engineering offers a comprehensive range of undergraduate and graduate programs designed to prepare students for successful careers in engineering, technology, and research. Our faculty are leaders in their fields, conducting groundbreaking research that addresses global challenges.

View Code
<!-- Clamp to 2 lines -->
<div class="max-lines-2">
    <p>Long text that will be truncated...</p>
</div>

<!-- Clamp to 3 lines -->
<div class="max-lines-3">
    <p>Long text that will be truncated...</p>
</div>

Decorative Line (Theme Utility)

Decorative horizontal line in UW Red for visual section breaks. Implemented via SCSS mixin @include coe-decorative-line;

Section Title


Content below the decorative line. This creates a visual separation and draws attention to the section.

View Code (SCSS)
// In your SCSS file
.your-element {
    @include coe-decorative-line;
}

// Or inline HTML
<hr style="border: none; margin: 0 auto 1rem auto; padding: 0;
    height: 4px; width: 80px; background-color: var(--bs-secondary);
    border-radius: 2px; opacity: 1;">

Screen Reader Only Text

Hide content visually while keeping it accessible to screen readers.

Example: The text "Screen reader only content" below is hidden visually but will be read by screen readers.

This text is only visible to screen readers. This text is visible to everyone.

View Code
<span class="sr-only">
    Screen reader only content
</span>

<!-- Common use case: form labels -->
<label for="search" class="sr-only">Search</label>
<input type="text" id="search" placeholder="Search...">

Text Transform

Transform text capitalization.

LOWERCASED TEXT

uppercased text

capitalized text

View Code
<p class="text-lowercase">LOWERCASED TEXT</p>
<p class="text-uppercase">uppercased text</p>
<p class="text-capitalize">capitalized text</p>

Font Families (Reference)

The theme uses multiple font families for different purposes.

Red Hat Display (Headings)

Engineering Excellence

Red Hat Text (Body)

This is the primary body text font. Clean, readable, and professional.

Sofia Sans (Alternative)

Alternative font with variable weight support (1-1000).

View Code
// Font families defined in _fonts.scss
// Applied via Bootstrap variables in _bootstrap_variables.scss

Red Hat Display: Headings (h1-h6)
Red Hat Text: Body copy (p, li, etc.)
Sofia Sans: Available for special use cases