CSS Joomla! 6 Joomla! 5 Joomla! 4 Template Basic

Override Bootstrap 5 CSS Variables in a Joomla Child Template

Customizes Bootstrap 5 colors, typography and corner radii cleanly using :root CSS custom properties without recompiling SCSS.

Updated on 24 November 2026 41 copies 146 views
media/templates/site/meu_tema/css/user.css
:root {
  --bs-primary: #147A3C;
  --bs-primary-rgb: 20, 122, 60;
  --bs-body-color: #12171C;
  --bs-body-bg: #FFFFFF;
  --bs-border-color: #DCE2E8;
  --bs-border-radius: 0px;
  --bs-border-radius-sm: 0px;
  --bs-border-radius-lg: 0px;
  --bs-body-font-family: "IBM Plex Sans", system-ui, sans-serif;
  --bs-font-monospace: "IBM Plex Mono", monospace;
}
Keep --bs-primary-rgb aligned with --bs-primary so opacity utilities work properly.

Technical explanation and best practices

Instead of scattering !important overrides or recompiling the entire Bootstrap bundle, declare your design tokens via standard --bs-* CSS variables inside user.css.

Direct Engineering

Have a Joomla project or technical challenge in mind?

From architectural diagnosis to production deployment, directly with the engineer.