nicolas wrote:
You don't need to use the full CSS path to customize the styles of HikaShop elements. There must probably be a simpler way to do your CSS changes, but anyway, if it already works...
Morning Nicholas,
Please don't get me wrong, I am not complaining by a long shot. It is that it forces me to rethink my CSS class specifity. It has more, I believe, to do with the naming conventions of classes in HikaShop.
For instance, on this page you will please note the white background. If I was designing an add-on template I would have the specifity for the class "hikashop_subcontainer hikashop_subcontainer_border". However, to address this item I must include the entirety of the class path and then trim it down, removing all the path information for a web page and the template specifics. In this case I would address the 127 class, or ID.
On
this page
to get the transparent background and drop shadow I addressed the following class:
div#hikashop_category_information_menu_127.hikashop_category_information div.hikashop_submodules div#hikashop_module_94.hikashop_module div#hikashop_category_information_module_94.hikashop_category_information div.hikashop_products_listing div.hikashop_products div.hikashop_product
Nothing else would work. And seeing that there are so many of these "numbered" classes used in HikaShop it has ballooned my custom CSS file's size. What was really needed was a way to shorten it to address just the "hikashop_subcontainer hikashop_subcontainer_border" portion. I had to use a similar workflow to address the drop shadow and border on the images in each category, sub-category, product, and sub-product. It made for a significant addition to the custom CSS file.
I've no idea how to make it work, other than in the manner I'm accomplishing it, but my thought is that the next time a major revision is contemplated, make the addressing of the classes easier to target. Make the untargetable class in the previous paragraph, targetable instead of having to address each numbered class with all of its sub-classes.
Just my two cents worth.
Cordially