generaxion / axio-starter

Superior WordPress starter theme with modern build tools by Generaxion (previously Aucor Starter). 250+ hours of development over 6 years to make the greatest starting point for WordPress site.
https://axio.generax.io
GNU General Public License v2.0
166 stars 25 forks source link

theme.json #55

Open kauaicreative opened 2 years ago

kauaicreative commented 2 years ago

Have you had a chance to check out the new theme.json system in WordPress 5.8

https://make.wordpress.org/core/2021/06/25/introducing-theme-json-in-wordpress-5-8/ "This new mechanism aims to take over and consolidate all the various add_theme_support calls... provides a way for theme authors to control these settings on a per-block basis "

TeemuSuoranta commented 2 years ago

We have followed development of theme.json to some degree but the first iterations have been somewhat unstable in the risk of compatibility in future. I've also heard some weird differences in HTML structure or styling with inline styles at the moment that will probably will be altered in the future so I'd recommend waiting still 1-3 releases before adopting it.

We can keep this issue open for all things related to theme.json before adopting it.

As a side note it is a bit bummer that it is a centralized file as it means that some logic for blocks will be outside modules but there might be ways to go around it in the future with filters.

kauaicreative commented 2 years ago

Hi @TeemuSuoranta I've been wondering if you have had any ideas since WP 5.9 related to full site editing. It seems like a lot has changed. Also what do you think about multiple css files as described here? https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-block/ Wondering how this could work in the Axio build system?

TeemuSuoranta commented 2 years ago

I'd still wait a bit for full site editing as things seem a bit unstable for that at the moment and it is very opinionated subject. If agency is building tailored websites for clients the full site editing stuff will add bunch of work and in many cases is not needed or even wanted (higher learning curve and tighter control on layout).

Multiple stylesheets should be possible already and for example all modules should be able to add new stylesheets in their _.json. I'm a bit hesitant to really go full in separating the code for tens of stylesheets because even though it might give a small performance boost to some cases it may also cause issues with hosting providers that use HTTP requests as base of quota and cause more work for servers (and ultimately making carbon footprint of the website bigger). I guess there is some balancing to be done but I don't have really good idea where it is.