Skip to content

Site Editor: Export global style settings #27528

Closed

Description

@carolinan

Is your feature request related to a problem? Please describe.
Global style settings are not included in the. zip file when I use the Export tool.

Describe the solution you'd like
If I create a design in the site editor, I want the changes I made in the global style settings (for example new color palettes) to be exported as a theme.json file when I use the Export tool, so that I can use my styles together with my exported templates.

Activity

  1. added
    Global Styles
    on Dec 5, 2020
  2. added
    [Feature] Site Editor
    on Feb 5, 2021
  3. aristath commented on Feb 5, 2021

    @aristath
    Member

    These should probably be exported alongside the template files that we already export.

  4. DaisyOlsen commented on Mar 19, 2021

    @DaisyOlsen
    Contributor

    This feels fairly important for getting theme developers onboard with building block themes. It feels like a disconnect that you can build out templates and templates-parts for export but not styles. I suspect that quite a lot of early block themes are going to end up with a lot of standard CSS until this is addressed.

  5. Sandstromer commented on May 5, 2021

    @Sandstromer

    Is the general thinking here that templates and global styles will be exported as a "new theme" completely detached from the base theme, or will the export be a sort of design to work with the base theme that the user started with?

    I can see potentially a use for both scenarios, where a user is creating for themselves or a client.

    1. a developer creating a bespoke theme
    2. a designer leveraging a current theme to use their bespoke design
  6. Sandstromer commented on May 6, 2021

    @Sandstromer

    Sorry I went slightly off-topic here but to answer my own question, it seems that exports can be done both ways. The choice lies with the designer/developer.

    When/if global styles, templates, and template parts are able to be exported in one package using the Site Editor export tool, this will be hugely helpful to theme devs.

    If it is desired to use a design with the current theme, then templates, template parts, and global styles can be exported using the WP exporter, and then imported to another site quite easily.

  7. carolinan commented on Aug 8, 2021

    @carolinan
    ContributorAuthor

    Since the 5.8 release I have received a few questions about why the theme.json is missing from the export.

  8. anarieldesign commented on Nov 16, 2021

    @anarieldesign

    Hi, this topic is soo important. I just asked @carolinan about this problem and she sent me a link to this ticket. We are thinking of switching our theme shop completely to an FSE theme with different demos but without this option to export Global Style settings it's not possible. I want to avoid using Customizer and child themes for fonts and colours and to be able to export settings from the Global Styles. Is there any chance we could have this in 5.9?

  9. anarieldesign commented on Nov 16, 2021

    @anarieldesign

    This feels fairly important for getting theme developers onboard with building block themes. It feels like a disconnect that you can build out templates and templates-parts for export but not styles. I suspect that quite a lot of early block themes are going to end up with a lot of standard CSS until this is addressed.

    Totally agree with @DaisyOlsen. We are working on a new FSE theme that will offer different demos and this option would be soo useful.

  10. annezazu commented on Nov 16, 2021

    @annezazu
    Contributor

    This came up in the eleventh call for testing for the FSE Outreach Program, which included a focus on Styles:

    I miss a way to save my custom settings, I can “Reset to defaults”, but cannot save, and or/import/export them

  11. added
    [Status] In Progress
    on Nov 18, 2021
  12. pbking commented on Feb 24, 2022

    @pbking
    Contributor

    This is an issue we have been using an experimental Theme Exporter plugin to try out. This is how we got a snapshot of the theme settings considering theme-provided and user-overriding values.

    We were also considering the three states of the settings when we want the snapshot:

    • As a child of the current theme (when we want only the values the user has edited)
    • As a "standalone" theme (when we want the settings provided by the theme, it's parent and those provided by the user)
    • As a "grandchild" theme (where we want the settings provided by the CURRENT theme, though not it's parent, as well as the user-supplied values).

    Which of those options are the default in the export .zip is important, as is a way to get that information independently of the export tool itself. The theme.json we need to craft varies on the situation.

    The "standalone" option seems most reasonable for most situations though, especially as a way to "kick start" a theme.

  13. Mamaduka commented on Mar 1, 2022

    @Mamaduka
    Member

    Hi folks,

    I create a new PR #39048 that's ready for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Global Styles[Feature] Site Editor[Status] In Progress

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions