Skip to content

Theming

Haven provides optional theme CSS files that control layout, spacing, and visual polish. You can use them as-is or extend them with your own styles.

Theme files

Load these after the Haven library:

html
<link rel="stylesheet" href="/haven-theme--default.css" />
<link rel="stylesheet" href="/haven-theme--directory.css" />
<!-- or for calendar -->
<link rel="stylesheet" href="/haven-theme--calendar.css" />
FilePurpose
haven-theme--default.cssShared base: buttons, images, filters, breadcrumbs, print styles
haven-theme--directory.cssDirectory grid layout and element ordering
haven-theme--calendar.cssCalendar list, upcoming/ongoing layouts, filter grid

The default theme is required; add the module theme matching your embed type.

CSS custom properties

Haven injects CSS variables at runtime. Theme files reference these:

VariableSet byPurpose
--haven-gapTheme CSSStandard spacing
--haven-grid-gapTheme CSSGrid gap between items
--haven-paddingTheme CSSContainer padding
--haven-breakpoint-mobilehaven.config({ breakpoints })Mobile breakpoint (px)
--haven-breakpoint-tabletbreakpoints configTablet breakpoint
--haven-breakpoint-desktopbreakpoints configDesktop breakpoint

Breakpoints

Pass breakpoints in haven.config() to inject responsive CSS variables:

javascript
haven.config({
  breakpoints: {
    mobile: 480,
    tablet: 800,
    desktop: 1024,
    'desktop-large': 1200,
    'desktop-xlarge': 1360,
  },
});

Haven adds a <style> block to <head>:

css
:root {
  --haven-breakpoint-mobile: 480px;
  --haven-breakpoint-tablet: 800px;
  /* ... */
}

Use these in your own media queries:

css
@media only screen and (max-width: 800px) {
  #haven-container {
    flex-direction: column;
  }
}

Directory layout

The directory theme uses CSS Grid on body.haven__view--directory-list to control element order:

  1. Category title
  2. Breadcrumb
  3. Map
  4. Filter
  5. Product list

Override order or spacing in your own stylesheet by targeting Haven's BEM classes:

css
.haven__directory .haven__item {
  /* custom item styles */
}

.haven__filter {
  margin-bottom: 20px;
}

Calendar layout

The calendar theme styles list items, daily groupings, upcoming widgets, and ongoing sidebars. Widget embeds use:

javascript
options: {
  css: 'haven__calendar haven__calendar--widget',
}

Matching your brand

Override Haven styles with your site's CSS variables or direct selectors:

css
.haven__item__title a {
  color: var(--your-brand-color);
}

.haven__button {
  background-color: var(--your-accent-color);
}

Load your overrides after Haven theme files.

Base library styles

haven.min.css (loaded by the Kit or standalone) contains component styles for the gallery, lightbox, map controls, and filter fields. Theme files build on top of these base styles.

haven-theme--default.css includes print rules that hide maps, filters, and navigation chrome when printing.

Haven Destinations integration documentation