How to override style_custom.css

  • Posts: 9
  • Thank you received: 2
  • Hikashop Business Hikashop Essential
1 year 11 months ago #348109

-- HikaShop version -- : 4.7.0
-- Joomla version -- : 4.2.6
-- PHP version -- : 8.1.1
-- Browser(s) name and version -- : Safari

Hi,

Joomla has made using the user.css as private styling css-file. Hikashop is pressing their own way by creating a style_custom.css.

I just want only one CSS-file to maintain! So how can I overrule the use of the style_custom.css? If I comment parts out (which I don't want to, for obvious reasons) the styling from hikashop.css is pushed, instead of my styling in user.css.

Can you point me to the right way to use my user.css to style HikaShop instead of styles_custom.css?

Thanks.

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 year 11 months ago #348112

Hi,

By default, HikaShop doesn't have the style_custom.css file.
That file is only added if you use the "styles for frontend" setting under the Display tab of the HikaShop configuration to add your custom CSS. By default, that setting is set to "none".
So you could choose you add your custom CSS in user.css and leave that setting to "none" so that it doesn't add style_custom.css at all on the pages.

Now, regarding hikashop.css that's the main CSS file of HikaShop. This file is normally required as it contains a lot of CSS for the positioning of the elements of HikaShop. It doesn't contain much styling so it shouldn't interfer much with your custom CSS in user.css
Also, normally, the template adds the user.css file after the hikashop.css file and thus it's the CSS in user.css which overrides the CSS in hikashop.css

Now, it is potentially possible to disable the addition of the hikashop.css file on the frontend as well as any other CSS file HikaShop may need. To do that, you can just add an entry with the namekey "load_css" and the value 0 in the hikashop_config table. However, I don't recommend doing that as you'll be missing many CSS code necessary for the proper display of HikaShop elements on the pages. This should only be done to optimize the CSS files of the website after you've copied all the CSS code from the CSS files of HikaShop to your template's CSS (when you're building your own template), and even so, I still don't recommend it as you'll miss any future CSS we'll add to HikaShop for new features of the support of future versions of Joomla.

I'm not clear on what is your issue though so I'm not sure what else to tell you.

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

Time to create page: 0.053 seconds
Powered by Kunena Forum