Enclavely / tailor

Build beautiful page layouts quickly and easily using your favourite WordPress theme.
https://www.tailorwp.com
GNU General Public License v3.0
1.05k stars 102 forks source link

[Concept] Tree Shaking Frontend CSS & Stylesheets a lot #149

Open AdsonCicilioti opened 7 years ago

AdsonCicilioti commented 7 years ago

Hello @andrew-worsfold! Congratulations on the tailor project ... it's amazing what you can do with it so quickly and intuitively by making use of the native WP Customizer interface.

As you should see in the title, I would like to bring a thought that can change the way we implement css in our projects, be it through a page building plugin or not. I believe that you already know the concept of Shaking Tree, much used in works in JS, ReactJS, angular ..

I've always thought of a page builder that did not add a stylesheet of all the available components, and most of the time we'll use a two-only one. In addition to our theme, it also has its own style sheet. It bothers me both the presence of two style sheets in the sense of performance, as in the fact of visual conflicts between styles of stylesheets.

Then I think about how I could optimize that relationship. I for example use Bootstrap a lot. Many use the Foundation, among others ... I know it would be complicated to create a selector where the developer would choose which css framework he would like Tailor to use in his components, as this would imply a very efficient trick for comparing element class names . Dai came up with the idea of ​​the Shaking tree, where each element would already take its own css in line or between the