neve icon indicating copy to clipboard operation
neve copied to clipboard

dynamic scss inline loading for different context

Open selul opened this issue 4 years ago • 1 comments

Description:

Started from #992, we could explore the mechanism of loading CSS code snippets based on the current context ( it could vary based on a customizer setting, single/archive page, etc ).

To accommodate this and leverage the power of SCSS, I was thinking that we could explore an SCSS -> PHP file generation and include the PHP file on demand when needed.

This should help a lot in reducing the page weight for complex CSS functionalities and load them only when needed.

selul avatar Jun 30 '21 15:06 selul

** Notes ** Could we maybe use something like this: https://github.com/assetic-php/assetic

Have a Singleton that handles registering, de-registering and output of assets. I think it should also support ordering or priority as it is important for CSS output.

preda-bogdan avatar Jul 07 '21 11:07 preda-bogdan