Abuja Digital Studio · Est. 2018
Start a Project
DocsOThemeDesign tokens and Global Styles
Reference

Design tokens and Global Styles

OThemeorravo.com/docs/otheme/tokens

Design tokens and Global Styles

OTheme is token-driven. Every front-end stylesheet reads CSS custom properties prefixed --orv-* and only the inline <style id="orv-tokens"> block in <head> holds their values.

Where tokens come from

The single source of truth is orv_settings() in inc/customizer.php. Every entry has a default and a sanitize callback. The registry feeds:

  1. The legacy WordPress Customizer
  2. The Orravo Theme > Global Styles screen
  3. The inline <style id="orv-tokens"> block at wp_head priority 999

Read a setting in PHP with orv_get( 'key' ):

php$accent = orv_get( 'orv_header_bg' );

Common tokens

  • --orv-ink - body text color
  • --orv-paper - background color
  • --orv-parch - secondary surface
  • --orv-gold - editorial accent
  • --orv-onav-bar-h - header height (set by ONav)
  • --orv-header-stack - combined header offset used by #orv-header-space

Components reference them with fallbacks:

css.orv-post-card__title a { color: var(--orv-ink, #1A1510); }

Style Kits

Orravo Theme > Style Kits swaps whole token sets in one save. Kits are tokens-only, no JS or images, so previewing one is fast and reversible.

Performance

Tokens are emitted inline (one less request). Section CSS and fonts can be deferred via Settings > Performance. The theme also dequeues every fonts.googleapis.com style at priority 999 unless you opt in with add_theme_support( 'orv-google-fonts' ).

Design tokens and Global Styles · OTheme Docs | Orravo