Wordpress delivers CSS code which is deleted/hidden after the web page has loaded. How does it work? - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Friday, June 23, 2023

Wordpress delivers CSS code which is deleted/hidden after the web page has loaded. How does it work?

I have been trying to replicate this land page because I like its design and I want to take it for a test web page. The thing is that I couldn't get the expected design and the trick was in the class name of the gallery, especifically this name: gallery-columns-3

When I inspected the web page and looked for gallery-columns-3, Chrome was saying that it found the name 2 times: once in the class declaration and another one inside an style label.

Here comes the interesting part: I was trying to find that name inside the style label and I double clicked inside the DevTools box to look for it, but I found nothing, and when I clicked on the web page to deselect the DevTools box (doing that I re-executed the CSS code), the web page lost its natural design.

You can replicate it and see how the web page behaves. When the second style label is re-executed, the web page losses its desing and it looks like raw HTML.

enter image description here

enter image description here

I know a little bit of HTML, CSS and PHP, but this behavior doesn't make sense for me.

What is happening behind the scenes? I don't mind if you think explanation is too technical.



source https://stackoverflow.com/questions/76534679/wordpress-delivers-css-code-which-is-deleted-hidden-after-the-web-page-has-loade

No comments:

Post a Comment