Skip to content

Additional CSS Erased When Switching Style Variations in WordPress 6.2 #50685

Closed

Description

@amjadr360

Description

The Additional CSS feature in WordPress 6.2 is not functioning as expected when switching style variations. Currently, any custom CSS entered into the Additional CSS field gets erased when a user switches to a different style variation and does not reappear when the user reverts back to the original style variation.

Expected behavior:

When switching between different style variations, the custom CSS entered into the Additional CSS field should persist. It should not be erased and should remain available for the user across all style variations.

This issue could potentially impact user experience, particularly for users who heavily utilize custom CSS for their site designs. It is important that user customizations persist across style variations for a more consistent and user-friendly experience.

Step-by-step reproduction instructions

  1. Open WordPress 6.2 site editor.
  2. Navigate to the Additional CSS field under Global Styles.
  3. Enter custom CSS and save.
  4. Switch to a different style variation.
  5. Observe that the custom CSS entered earlier has been erased from the Additional CSS field.
  6. Switch back to the original style variation.
  7. Notice that the Additional CSS field remains empty and does not reload the custom CSS entered earlier.

Screenshots, screen recording, code snippet

Monosnap.screencast.2023-05-17.09-34-09.mp4

Environment info

WordPress version: 6.2
Gutenberg version: 15.7.1
Active Theme: Twenty Twenty-Three
Browsers: Chrome
Device and Operating System: Macbook

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. added
    [Type] Bug
    [Feature] Theme Style Variations
    on May 20, 2023
  2. mrfoxtalbot commented on May 20, 2023

    @mrfoxtalbot

    Ugh, that sucks. Thank you for reporting this, I was able to reproduce this on my end.

  3. annezazu commented on Jun 2, 2023

    @annezazu
    Contributor

    Hey there! Thanks for reporting. This is a duplicate of the current issue: #47433 (comment) I'm going to close this out as a result but feel free to reopen if I missed something.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Theme Style Variations[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions