Archived topic
I want to Hide the Additional CSS
4 replies · Started by Rohith on June 20, 2021
How to hide the css from displaying in source code? Can I add it to theme files? Please help me
Hi there,
Unfortunately I don't think it's possible to hide CSS code.
Most of the websites are hiding the css. Could you please check and tell once again?
You can try use a child theme:
https://docs.generatepress.com/article/adding-css/#using-a-child-theme
Hi Rohith,
Most of the websites are hiding the css. Could you please check and tell once again?
There's no way to hide client-side CSS. You can try to minify and merge it into one file but this can always be downloaded and beautified.
While you can try to prevent the users from inspecting the site by disabling right-click and other things, there's always a workaround for this.
Perhaps what you meant is adding it on a stylesheet file? If that's the case, you can try Ying's suggestion which is to use a child theme's style.css. This way, it's not embedded on the page.