Fix link hover colors and change color theme CSS files order (#42794)

* Fix link and button colors in header footer

* Add hover state color for links, fix theme color web asset order, add hover color to theme color CSS files

* Place theme colors before user.css

---------
This commit is contained in:
Rick Spaan 2024-03-06 16:45:08 +01:00 committed by GitHub
parent ab3d32cb17
commit 995fea072b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 1 deletions

View File

@ -56,6 +56,10 @@ h6 {
a {
color: var(--#{$prefix}link-color);
&:hover {
color: var(--#{$prefix}link-hover-color);
}
&:not([class]) {
text-decoration: underline;
}

View File

@ -9,4 +9,6 @@
--link-color: #{$alternative-color-link};
--link-color-rgb: #{to-rgb($alternative-color-link)};
--cassiopeia-color-hover: #{$alternative-color-hover};
--link-hover-color: #{$alternative-color-hover};
--link-hover-color-rgb: #{to-rgb($alternative-color-hover)};
}

View File

@ -9,4 +9,6 @@
--link-color: #{$standard-color-link};
--link-color-rgb: #{to-rgb($standard-color-link)};
--cassiopeia-color-hover: #{$standard-color-hover};
--link-hover-color: #{$standard-color-hover};
--link-hover-color-rgb: #{to-rgb($standard-color-hover)};
}

View File

@ -39,7 +39,6 @@ $pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
// Color Theme
$paramsColorName = $this->params->get('colorName', 'colors_standard');
$assetColorName = 'theme.' . $paramsColorName;
$wa->registerAndUseStyle($assetColorName, 'media/templates/site/cassiopeia/css/global/' . $paramsColorName . '.css');
// Use a font scheme if set in the template style options
$paramsFontScheme = $this->params->get('useFontScheme', false);
@ -67,6 +66,7 @@ if ($paramsFontScheme) {
// Enable assets
$wa->usePreset('template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
->registerAndUseStyle($assetColorName, 'media/templates/site/cassiopeia/css/global/' . $paramsColorName . '.css')
->useStyle('template.user')
->useScript('template.user')
->addInlineStyle(":root {