Forum Support

Shape 5
March 28, 2024, 07:36:52 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Best Practice: changing template.css, s5_accordion_menu.css and custom.css.  (Read 713 times)
phoenix710
Jr. Member
**
Offline Offline

Posts: 20



« on: October 23, 2017, 08:37:00 AM »

Joomla 3.8.0
Template: StorePro, downloaded a few days ago.
Plugin: Accordion Menu, also downloaded a few days ago.

While working on some styling for the Accordion Menu module, I used the dev tools feature of Chrome to find the style(s) I needed to modify. (Pretty standard, no surprises ...)

I then confirmed that new styles placed in custom.css (in the template subdir) did, in fact, take precedence as expected.

However, while attempting to change the hover/active color of the top-level elements, I discovered that there were 30+ s5_accordion_menu CSS style defs were in template.css, while a relatively small number were in s5_accordion_menu.css.

I've seen, for the most part, the s5_accordion_menu styles in template.css are a superset of those found in s5_accordion_menu.css. I didn't expect this. (Of course I understand that the Accordion Menu styles found in the template's CSS file will be ignored if the Accordion Menu is NOT installed.)

Since I'm new with S5, I have no idea how frequently the templates and extensions are updated (if ever), which brings me to the question of Best Practice.

What is best practice for style changes? I've noticed in reviewing many entries in this forum that there is the frequent inference and/or mention of actually changing the template and/or extension CSS files directly. I thought that this type of change was NOT to be done, since either the template and/or the extension could be updated and reinstalled; any changes made to source files would be therefore be lost.

Is there any reason to NOT use custom.css for ALL changes?
It is more efficient to the rendering if the source files contain the custom styles?
Is custom.css the "last place" checked by the rendering engine for styling data?

Or, is it the case that StorePro and/or Accordion Menu (in my site) will never be updated, and therefore source file changes can be, in effect, viewed as permanent?

Thanks,
Dave
Logged
jonahh
Administrator
*****
Offline Offline

Posts: 23789



WWW
« Reply #1 on: October 23, 2017, 12:19:13 PM »

Hey Dave,

The custom.css file is specifically for your custom changes so that you can backup this file and reinstall the template if you need to. But since most updates usually always take place on a framework level you probably will never come across this situation unless something happens like the template files get messed up with an edit.

When you patch the framework files it will never touch the template.css file or custom.css files. The only reason a template would ever get updated would be a CSS bug but these usually happen near the beginning of a template launch and are quite rare anymore. Also if they do happen we usually post the fix so you could just update it yourself vs re-installing the entire template.

Logged

Jonah Hall
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
phoenix710
Jr. Member
**
Offline Offline

Posts: 20



« Reply #2 on: October 23, 2017, 12:51:39 PM »

Thank you for the info.
Dave
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.