Roots Discourse

Style Packs

“Style packs” are an interesting idea. I’m on the precipice of building a series of WordPress sites and I’m leaning towards Sage (for the first time). If I could implement this style pack concept it would cut my work in half. My question is: is there any obvious roadblocks to implementing style packs in Sage or, even better, what’s the likelihood that Roots might be persuaded to add style packs as a feature?

Sage is a starter theme that doesn’t make any assumptions regarding design. This is what makes it stand out from other starter themes. Development-wise it gives you a super head start. Design-wise you’ve got a blank slate.

If you install Sage with the default setting (Bootstrap as the CSS framework), this is what a fresh site will look like:

The includes styles are intentionally minimal and designed to be replaced. If you use the installer there is an option for a blank slate (CSS framework-wise).

The foundation Sage provides really makes anything possible. Design-wise you can do whatever you want.

I think this would compromise the implicit core value of being a blank slate.

1 Like

Right, I understand that. It’s not so much adding a particular series of styles I’m interested in so much as a mechanism for building a Sage-based theme that allows me to give a user a series of styles in one theme. In theory I could hack on this myself but I’d feel a lot more confident about using Sage in this manner if I knew the community could support the concept in a real technical way.

1 Like

Ah, that makes sense. An implementation off the top of my head would be:

  • Add some kind of functionality in Customizer to allow for changing the style pack.
  • In app/setup.php enqueue the styles based on the style pack setting.
  • In resources/assets/config.json add the style packs as new entries. Perhaps, main could remain as a global stylesheet, though this might not be ideal since you would to enqueue 2 stylesheets. Instead, I think it would be best to have global styles imported into all of the style packs.

:bulb: This could be something that was included in the sage-installer.


1 Like