Jump to content

Where do inline stylesheets hide?


AlvaroB

Recommended Posts

Hello everyone!

I'm trying to edit the "Add to wishlist" (♡) button from the classic theme.

Searching in chrome it appears to be modified in the <style> section of the header

Searching through the files it appears to be loaded from stylesheets.tpl:

{foreach $stylesheets.inline as $stylesheet}
  <style>
    {$stylesheet.content}
  </style>
{/foreach}

However, after a lot of research through these forums and google I am not able to understand where does this $stylesheet.content come from.

I think that maybe I could just overwrite it using custom.css. But I want to understand how this website works too.

Thank you.

Edited by AlvaroB (see edit history)
Link to comment
Share on other sites

I gave up and tried editing said property using custom.css. But as that style comes from <style>, it has priority so I can't modify it using external css files. I have to find where that property hides. Any ideas? I already searched most if not all tpl files.

Link to comment
Share on other sites

Ok I finally spent enough hours to find it (spoiler: too many).

This kind of styles are embedded in the .js that governs the modules (it shouldn't be, but it is).

So in my case, I could find it in both 

modules/blockwishlist/public/product.bundle.js

and

modules/blockwishlist/public/button.bundle.js

but depending on what you're looking for, it may be hidden in other .js file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...