J4 - Cassiopeia - 'Send Email' button colour.

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
bannisa
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Thu Jan 28, 2010 6:09 pm

J4 - Cassiopeia - 'Send Email' button colour.

Post by bannisa » Mon Mar 11, 2024 6:16 pm

I changed the colour scheme of my template by including the following in user.css

Code: Select all

:root {
  --cassiopeia-color-primary: #fff;
  --cassiopeia-color-hover: #9669a9;
  --cassiopeia-color-link: blue;
}
This worked fine, until I realised that in setting the primary colour to white the background of my 'Send Email' button was also set to white - and so could not be seen.
I have searched various css files to see where I might create an override in user.css but cannot find anything.
Does anyone out there have an idea?
Last edited by imanickam on Tue Mar 12, 2024 5:39 am, edited 1 time in total.
Reason: Moved topic » from Joomla! 4.x Coding to Templates for Joomla! 4.x

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28216
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: J4 - Cassiopeia - 'Send Email' button colour.

Post by imanickam » Tue Mar 12, 2024 5:37 am

The button interface look-and-feel is facilitated by the the css class btn-primary. The following css entries that are found in the file template.css are executed in the following order. You could override these css entries in the file user.css. In fact, the attribute background-color plays a major role in the button color.

Code: Select all

.btn-primary {
  --btn-color: #fff;
  --btn-bg: #010156;
  --btn-border-color: #010156;
  --btn-hover-color: #fff;
  --btn-hover-bg: #010149;
  --btn-hover-border-color: #010145;
  --btn-focus-shadow-rgb: 39, 39, 111;
  --btn-active-color: #fff;
  --btn-active-bg: #010145;
  --btn-active-border-color: #010141;
  --btn-active-shadow: inset 0 3px 5px #00000020;
  --btn-disabled-color: #fff;
  --btn-disabled-bg: #010156;
  --btn-disabled-border-color: #010156;
}


.btn-primary {
  background-color: var(--cassiopeia-color-primary);
  border-color: var(--cassiopeia-color-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--cassiopeia-color-hover);
  border-color: var(--cassiopeia-color-hover);
}
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17510
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: J4 - Cassiopeia - 'Send Email' button colour.

Post by toivo » Tue Mar 12, 2024 6:26 am

Target the contact form and add the following lines to user.css:

Code: Select all

#contact-form button.btn-primary { 
	background-color: blue;
}
Toivo Talikka, Global Moderator


Post Reply

Return to “Templates for Joomla! 4.x”