Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Sources/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -2285,6 +2285,17 @@ protected function loadVariant(): void
if (Utils::$context['theme_variant'] == '' || !\in_array(Utils::$context['theme_variant'], $this->settings['theme_variants'])) {
Utils::$context['theme_variant'] = !empty($this->settings['default_variant']) && \in_array($this->settings['default_variant'], $this->settings['theme_variants']) ? $this->settings['default_variant'] : $this->settings['theme_variants'][0];
}

/*
* The other way to recolour a variant is a whole stylesheet of its
* own, sitting on top of index.css. The 'default' variant is the base
* sheet by itself, so it has no file of its own to load, and a theme
* that recolours through variants.css above has none either - the
* file is validated, so a missing one is simply not loaded.
*/
if (Utils::$context['theme_variant'] !== 'default') {
self::loadCSSFile('index_' . Utils::$context['theme_variant'] . '.css', ['order_pos' => 2], 'smf_index_' . Utils::$context['theme_variant']);
}
}
}

Expand Down