Omnira Docs v1.0.0

Styles (SCSS)

Styles are written in SCSS in src/scss/ and compiled to assets/css/omnira.css (readable) and omnira.min.css (compressed) by the build. Bootstrap 5's CSS is loaded first from assets/vendor/.

Files#

FileContains
omnira.scssThe entry file that includes all the others.
_variables.scssDefault colours, radius, header height, spacing and breakpoints, plus the up()/down() media-query helpers.
_base.scssCSS variables, typography, section tones and spacing, reveal animations.
_buttons.scssButtons and the play button.
_header.scss, _nav-extras.scssHeader, top bar, menus, dropdowns, mobile menu, colour switcher.
_hero.scssAll hero variants.
_sections.scssMost content sections.
_realestate.scssSearch, property cards, filters, property pages, mortgage, agents, compare, blog article, 404, sign-in, jobs.
_footer.scss, _components.scssFooter; forms, lightbox, back-to-top, demo switcher, overview page.
modules/_core-*.scssDetail pages, bento, tabs, slider, before/after, shop and other newer sections.
modules/_<demo>.scssTouches specific to one demo, scoped to body.demo-<demo>.

Colours are CSS variables#

Components use variables such as var(--primary), var(--dark) and var(--radius), which each page sets from its demo's theme. That's why changing a hex value in demo.json restyles everything. Inside a section, tone-aware variables adapt to the background: --bg, --fg (text), --hd (headings), --muted, --card, --line, --brand.

Adding your own styles#

Create a file in src/scss/modules/, e.g. _my-site.scss. Every file in that folder is included automatically:

src/scss/modules/_my-site.scss
@use '../variables' as *;

// Larger hero titles on my restaurant site only
.demo-restaurant .hero-title { font-size: clamp(3rem, 2rem + 4vw, 6rem); }

// Rounder cards everywhere
.feature-cards, .service-card, .post-card { border-radius: 24px; }

@include down($bp-md) {
  .hero-text { font-size: 1rem; }
}

Keeping your changes in your own file means template updates won't overwrite them.

Page and demo classes#

Every <body> has demo-<demo> and page-<page> classes, e.g. <body class="demo-cafe page-about …">, so you can target one demo or one page.