Skip to content

Additional CSS navigation button only shown when there is some additional CSS already set #66333

@afercia

Description

@afercia

Description

Noticed on a screenshot provided by @jameskoster on #66307 (comment)

Looking at that screenshot, I was wondering why I didn't see any 'Additional CSS' button in my Styles panel.

Turns out that seems intentional, as the navigation button is rendered based on a condition that also checks whether some additional CSS is already set.

I had to figure out how to navigate to the Additional CSS panel and ultimately found it in the 'More' ellipsis button at the top of the Styles panel.

To me, this seems to be a perfect way to hide features and make them less discoverable from users. I'd appreciate to know why the navigation button is rendered conditionally and whether this makes the UI more usable in any way.

I'd like to propose to make things simple and just not implement behaviors that may look smart at first but ultimately are arguable ad likely confusing for users.

@WordPress/gutenberg-design do you know why this is rendered only after some adidtional CSS has been set?

Also, the feature description:
Add your own CSS to customize the appearance and layout of your site.
is completely missing at first and only shown after the feature has been used. It's arguably usable to provide a description only after the feature it relates too has been used.

Image

Step-by-step reproduction instructions

  • Make sure you dont have any additional CSS set in the Global Styles.
  • Open the Styles panel
  • Observe there is no 'Additional CSS' navigation button at the bottom of the panel.
  • Open the ellipsis menu and click 'Additional CSS'.
  • Enter some additional CSS.
  • No need to save.
  • Go back to the main panel by using the 'Back' chevron icon button at the top of the additional CSS panel.
  • Onserve the main Styles panel and see there is now an 'Additional CSS' navigation button, together with the feature description.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonNeeds Design FeedbackNeeds general design feedback.[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Edit Site/packages/edit-site[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions