I have a function in PHP that will show me all the CSS code in the front end before HTML. Only admin can see this CSS code printed on the screen, using the "include"
method.
What I'm trying to figure out is how do I copy all of this CSS displayed on the screen to a new CSS file.
Given that this CSS file appears on the screen it contains PHP variables, but on the screen it does not show these variables, but rather the value of them printed (colors, font size, etc). exit displayed by the browser .
What I want to avoid is that admin has to copy all of this CSS manually through the screen, and have it pasted into a new CSS file.
So now I do not know how to copy this CSS that is on the screen with some specific function for this, be it PHP or Javascript. There are about 2000 lines to be copied to a new CSS file.
Can anyone give me some insights on how I can achieve this? Since the intended one is not a function to copy content from one file to another with the copy method, in that case all PHP code inside the CSS would be copied. What I want is a way to copy the output code displayed by the browser already with all CSS values (colors, font sizes, etc.).