No Code Attached Yet
avatar pl71
pl71
17 Mar 2024

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
link_color

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.

avatar pl71 pl71 - open - 17 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 17 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Mar 2024
avatar pl71 pl71 - change - 17 Mar 2024
The description was changed
avatar pl71 pl71 - edited - 17 Mar 2024
avatar ReLater
ReLater - comment - 18 Mar 2024

SEE ALSO NEXT COMMENT!

colors_alternative.css defines the link color as blue. Other words: #30638d is a kind of blue.

grafik

grafik

avatar ReLater
ReLater - comment - 18 Mar 2024

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.

grafik

Looks like it's the same in J!5.1 (but I'm tired ;-) )

avatar pl71
pl71 - comment - 18 Mar 2024

colors_alternative should modify template.css in order to reduce css files on demand.

avatar ReLater
ReLater - comment - 18 Mar 2024

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 ;-)

avatar richard67 richard67 - close - 18 Mar 2024
avatar richard67
richard67 - comment - 18 Mar 2024

Closing as having a pull request. Please test #43084 . Thanks in advance.

avatar richard67 richard67 - change - 18 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-18 11:41:40
Closed_By richard67
avatar ReLater
ReLater - comment - 18 Mar 2024

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.

avatar pl71
pl71 - comment - 18 Mar 2024

@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);
    ....
avatar richard67
richard67 - comment - 18 Mar 2024

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.

avatar ReLater
ReLater - comment - 18 Mar 2024

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:

grafik

avatar ReLater
ReLater - comment - 18 Mar 2024

@pl71 just FYI. The fix will be in next 5.1 version.

Add a Comment

Login with GitHub to post a comment