manage css for many templates

  • Posts: 846
  • Thank you received: 92
11 years 3 months ago #157628

Hi
is there a standart way how css location is manage in joomla extension refer to selected /active joomla template ?
it seem it is a real mess like javascript ( no js loader implemented ) !! i begin to unsderstand why Hikashop team work hard on their website with strong css knowledge ! In way best i to buy a template with the expected extension and custom it !!
if i want a new style in hikashop ; with the default setting i need to duplicate /rename many selector inside the hikashop css file !!
which option Hikashop give to joomla designer for manage CSS file location ? Does give some option is usefull ?

regard's

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #157692

Google "CSS".

And digest first that it's the order of CSS code which matters - hence, the order in which the same code is in one single file, or the order in which CSS files are loaded if the same code is spread out across multiple files. You can have 10 different body backgrounds across 5 files, but the last one wins - unless there's a single "!important" in between.
Which is why many - wise - template makers, or smart site designers, make sure that a particular file, often the so-called custom a.k.a. override CSS file is loaded last. In that you can pretty much do what you want, then. You'll (almost) always win - exceptions were mentioned above. So, who cares what extension developers do in terms of CSS, and where they store their files. Sometimes it's better to "unload" those files anyway, as it gets too often in the way of a neat template design.
So, then it's almost only a matter of how much or less bloated you want your code, IOW how many more or fewer bytes you want to have the user loading before the pixels show up on the screen. Which sure matters more in some parts of the world and/or data "highways" more than in others. It's probably equally important to avoid chaos and have things kinda "together". In the age of Firebug & Co it seems maybe less important, but IMHO strategy is a wonderful thing - but what's new.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: Xavier

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
11 years 3 months ago #157824

thank's for your reply. I have a look to a few commercial template bundle/custom with some extensions and it seem those css files extensions (i wanted to write all ) are place under templates/temapltename directory .

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #157826

Sorry, I'm not sure what this is about.

It makes total sense if templates have their CSS files in a folder somewhere in the template file structure.

I'm not aware of extensions placing their individual CSS into the template folder, even if bundled with templates. It wouldn't make good sense. If one does, then look closely, it's probably an override made for a particular template, but the extension's original CSS probably exists somewhere else. Otherwise it could lead to trouble if the user decided to use another template - but suddenly there's no more CSS for the extension he intends to keep using.

So, it's common practice for extension makers to put their "own" CSS files somewhere along with their extension files (like i.e. HikaShop in their CSS folder under /media). How else, since - if installed separately - they don't know what template you're using, it's (folder) name, code/file structure and all that, unless they asked you very particular questions during installation?


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 846
  • Thank you received: 92
11 years 3 months ago #157953

how can we load different hikashop template ( css) when we use different joomla templates ? all on the same joomla server ?

let the joomla cms load the default HKS css and then use a css file that ll be load fter HKS css that override some HKS style ?
So for summarize if i have 5 extensions in a joomla website i load the all the default extension s and override all the css in one css file ?!

regard's

Last edit: 11 years 3 months ago by lionel75.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum