Add a core variables files so streams only need to include the variables they override
AKA how to keep streams and the core RL theme in sync.
Really useful outcome of the Uttoxeter Sprint has been working with @haystack to make Radstock a 'stream' – Wellow. This has helped clarify a number of things:
- this project is a dead-end if it's a new bottleneck controlling/limiting all themes or core. Streams should have as much autonomy, freedom and flexibility as current themes, with the advantage of being quicker to create and maintain. For that reason using 'stream' rather than 'sub-theme' seems helpful as it avoids the suggestion of being subordinate.
- By sharing CSS variables with RL core (the 'iceberg'?) changes to Civi core shouldn't break Streams - the iceberg acts as a kind of interpreter(?) on these changes. But there will still be times when RL core needs to change in a way that impacts streams. A big change might be rewriting mobile-viewport tables; a small change might be adding a new css variable.
- At present every Stream has a copy of all the variables, which leads to somewhat annoying commits adding a new variable to every stream: e.g. 922a7e52. This is barely sustainable with 5+ back-end themes, but unrealistic once there's 20 streams for 20 front-ends.
- Christian made the so-obvious-it-hurts suggestion of having a core variables file with everything alongside stream specific variables files, with only the values they want to diverge from.
- @artfulrobot futher suggested keeping a default 'empty' starter stream with a copy of the core variables, but commented out, so you can un-comment the ones you want to diverge from.
This is a really nice solution. It dramatically shrinks the 'can't change RL core in case it breaks a stream' bottle neck. It shrinks the size and complexity of streams, making them, hopefully, easier to maintain. I also don't need to start interfering with other people's streams adding variables, there's a clearer separation of responsibilities.
Edited by nicol