Styling magically appears on a page

Hello Community,

here is a problem I can’t wrap my mind aroud, please help me if you can :grinning_face:

Say that I have 2 stylesheet ruling different pages of my website, but never used together on the same page - let’s call the stylesheets files A and B.

File A has the styling code for the CSS classes used on a certain webpage, while file B doesn’t have any.

My goal is, on that same webpage, to remove file A and replace it with file B (eventually integrating the style, so that the layout is not affected).

With this said, in the Design Manager, I picked the webpage’s Template, removed file A (=classes styled) and replaced with file B (=no classes styled).

Here is the weird thing: if I inspect that webpage from the Chrome Dev Tools, I see that many of the classes styled in A (not used) had “magically appeared” on the Source File - B (not in the original CSS file, but only on Chrome Dev).

Many of the styling feaures of the webpage with file A (like box shadow, or background-image) were magically also applied to the same webpage with file B.

I have to say “many” and not “all” because the final layout of the webpage was not totally similar to the same page before the replacement. In other words: webpage + file A and webpage + file B do not look 100% similar.

How is that all possible?

P.s. thank you for any advice, I know this sounds like a confused question :confused:

Hey @FedeColap

Sounds like the styles are being cached. Try viewing in a private browser.

Hi @Kevin-C ,

and first of all thanks for taking the attempt to answer!

If by “private browser” you mean the Incognito window, I have tried and the styles are still there. Also, I have published that page with the file B, but still the syles are in the published version too.

I am trying to see if this file A is attached to the webpage in any way (settings, template level, page editor) but seems like it’s not. :woman_shrugging:t2:

Do you have a live link we can inspect??

For completeness of information, credits to @Kevin-C who stirred me in the right direction, suggesting that the stylesheet currently used (file B) had a {%include ‘…’ %} method pointing to file A, and that is why the elements were styled.

Closing this ticket, as this answers to my question. Thank you @Kevin-C !!