Closed pl71 closed 6 months ago
SEE ALSO NEXT COMMENT!
colors_alternative.css
defines the link color as blue. Other words: #30638d is a kind of blue.
Confirmed!
AH, sorry! Yes you're right. Wrong color.
Solution: I think colors_alternative.css should be loaded AFTER template.css but is loaded first.
Looks like it's the same in J!5.1 (but I'm tired ;-) )
colors_alternative should modify template.css in order to reduce css files on demand.
Off Topic. Open a discussion?
colors_alternative should modify template.css in order to reduce css files on demand.
I compile my CSS files from SASS/Scss. Also in Cassiopeia child templatess. Then things like that (removing redundant CSS code and combining) are "easily" possible.
But I think your expectation is too much that whenever changing a colors scheme template.css, template.min.css, template.min.css.gz are newly generated. From my point of view it would also obfuscate how colors_xyz.css work. It would become obscure science in this core template that should be as minimalistic as possible. From my point of view ;-)
Closing as having a pull request. Please test #43084 . Thanks in advance.
I have closed my pr because:
Closing as this has already been fixed in https://github.com/joomla/joomla-cms/pull/42794/files in another way but not ported to Joomla 5 yet.
I don't know how to port that code.
@ReLater Not quite sure, but these variables should go before template.css
template.css
is using them, at least --link-color
:
3333:
.btn-link {
--btn-font-weight: 400;
--btn-color: var(--link-color);
....
I have closed my pr because:
Closing as this has already been fixed in https://github.com/joomla/joomla-cms/pull/42794/files in another way but not ported to Joomla 5 yet.
I don't know how to port that code.
@ReLater See my comment in your closed PR. The fix should have been ported to the 5.1-dev branch.
Not quite sure, but these variables should go before template.css template.css is using them, at least --link-color:
Nope. Because it's a :root{} rule. See image:
@pl71 just FYI. The fix will be in next 5.1 version.
Not sure if issue 42679 is connected, but noticed that
--link-color: #224faa;
is hardcoded in Cassiopeia. I've tried "Templates: Edit Style/Advanced/Colour Theme=Alternative", but links are still blue. "\media\templates\site\cassiopeia\css\global\colors_alternative.css" has at row 4 '--link-color: #30638d;', but it stays not used IMHO.Steps to reproduce the issue
Have a brand new site with a Cassiopeia theme. Switch to the "Alternative" color theme.
Expected result
Links to use color from
colors_alternative.css
Actual result
Links are using color from
colors_standard.css
System information (as much as possible)
J5.0.3
Additional comments
Same behavior with the child template. EDIT: Tried also totally different colors, but
link-color
has to be defined in user.css to work.