Page 1 of 1

Media CSS override. How To?

Posted: 13 May 2020, 08:35
by Jfruiz
I'm using Gantry Helium template with last Phoca Cart version and have made some changes in files media/com_phocacart/bootstrap/css/bootstrap4.min.css and media/com_phocacart/css/main.css to correct some glitches that appeared in the templete and adjust it a little to my preferences, but any time that I get a phoca cart update, logically I loose that mods.

Maybe this is a Joomla general question, more than a phoca cart related one, but moving the the changes to template custom.ccs do not work and after searching in the web I don not find information about how to override css files of media folder...

Is there any way to make a template override for those files?

Re: Media CSS override. How To?

Posted: 14 May 2020, 00:04
by Jan
Hi, the question is, why does not work setting the changes in custom.css or user.css?

Are you 100% the custom.css or user.css is loaded on your site? It such CSS file loaded as last to override previous CSS rules?

Jan

Re: Media CSS override. How To?

Posted: 14 May 2020, 00:19
by maintainthedomain
check that you have templates/g5_helium/custom/scss/custom.scss

File is not there by default; you have to create the file/directory yourself.

The changes in that file will override BS styles.

Re: Media CSS override. How To?

Posted: 14 May 2020, 08:37
by Jfruiz
I see... I made changes in css/custom.css... not in scss/custom.scss

Will try again...

Thanks.

Re: Media CSS override. How To?

Posted: 14 May 2020, 09:49
by Jfruiz
I have restore the original files (media/com_phocacart/css/main.css and media/com_phocacart/css/main-product-image-move.css) and include the changes in templates/g5_helium/custom/scss/custom.scss, but changes do not apply that way

I have check the element in the browser and it only take properties form main.css not from custom.scss.

I'm sorry if that is a little stupid, unfortunately my knowledge about all this is mostly based on try/fault.

Re: Media CSS override. How To?

Posted: 14 May 2020, 11:01
by christine
Hi Jfruitz,
maintainthedomain wrote: 14 May 2020, 00:19 check that you have templates/g5_helium/custom/scss/custom.scss

File is not there by default; you have to create the file/directory yourself.

The changes in that file will override BS styles.
Tks for your information.

in addition: http://docs.gantry.org/gantry5/tutorial ... tyle-sheet
You need to recompile the CSS and clear the cache.

Kind regards
Christine

Re: Media CSS override. How To?

Posted: 14 May 2020, 16:28
by maintainthedomain
In Helium template -> Extras (top right corner)-> set it to Development mode

then you dont have to recompile css / clear cache all the time you make a change...

also make sure you're editing g5_helium/custom/scss/custom.scss

Re: Media CSS override. How To?

Posted: 22 Aug 2021, 11:08
by Jfruiz
For future reference, the overrides should go in g5_helium/scss/custom.scss not in g5_helium/custom/scss/custom.scss

Re: Media CSS override. How To?

Posted: 22 Aug 2021, 11:51
by Jan
Hi, thank you for the info.

Jan