CSS variables
Igloo uses CSS custom properties (variables) for all theme related styling.
Generated theme
When ever the theme node is saved, the ig-theme.css is used as a template to create a new css file under /css/generated-themes/ Here you can see a generated theme css file.
:root{
//Base
--white: #fff;
--black: #000;
// Theme
--theme: #3aa5ed;
--theme-rgb: 58, 165, 237; // rgb from --theme
--theme-darker: #148ee0; // 10% darken than --theme
--theme-contrast: #fff;
// Theme secondary
--theme-alt: #2ecc71;
--theme-alt-darker: #25a25a; // 10% darken than --theme-alt
--theme-alt-contrast: #fff;
// Dark
--heading-dark: #111;
--text-dark: #444;
--background-dark: #111;
--background-dark-lighter: #1b1b1b; // 5% lighter than --bakground-dark
--border-dark: rgba(0,0,0,0.08);
// Light
--heading-light: #fff;
--text-light: #fff;
--background-light: #f9f9f9;
--border-light: rgba(255,255,255,0.1);
// Header
--selected-nav-item: #3aa5ed;
--header-height: 70px;
--logo-padding: 24px;
--pre-top-height: 30px;
--top-combo-calc: calc(var(--header-height) + var(--pre-top-height));
--navigation-padding: 30px;
--navigation-font-size: 0.875rem;
--navigation-font-weight: bold;
// Grid
--grid-width-small: 850px;
--grid-width: 1300px;
--grid-width-big: 1600px;
--grid-gutter: 30px;
--grid-gutter-half: calc(var(--grid-gutter) / 2);
// Buttons
--button-border-radius: 4px;
// Typography
--body-font: "Roboto", sans-serif;
--heading-font: "Roboto", sans-serif;
--font-size: 1.1rem;
--font-size-big: 1.25rem;
--font-size-small: 0.75rem;
--body-line-height: 1.6;
--font-size-h1: 2.5rem;
--font-size-h2: 2.25rem;
--font-size-h3: 1.75rem;
--font-size-h4: 1.5rem;
--font-size-h5: 1.2rem;
--font-size-h6: 1rem;
--hero-heading: 3.75rem;
--heading-line-height: 1.5;
--font-weight-normal: normal;
--font-weight-light: 300;
--font-weight-bold: bold;
--font-weight-bolder: bolder;
--body-font-weight: normal;
--heading-font-weight: bold;
--text-big-font-weight: 300;
// Validation
--success: #2ecc71;
--error: #e74c3c;
@media @l{
--navigation-padding: 15px;
}
@media @m{
--header-height: 50px;
--grid-gutter: 20px;
--logo-padding: 15px;
--navigation-font-size: 1rem;
}
@media @s{
--grid-gutter: 15px;
--hero-heading: 2.5rem;
}
@media @xs{
--grid-gutter: 15px;
}
}
CSS template file
Here you can see what the ig-theme.css file looks like, values like {themeColor} are replaced with the value from the theme node in Umbraco.
Last updated
Was this helpful?