Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Styles: Better labeling and instructions for global CSS and per-block CSS #51821

Closed
jordesign opened this issue Jun 22, 2023 · 9 comments
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@jordesign
Copy link
Contributor

jordesign commented Jun 22, 2023

Description

The two options for adding CSS via the Site Editor (Additional CSS and Per-block CSS) are powerful and useful - but there are some places where labeling and instructions could give more clarity to which function the user is currently viewing, and assistance on how to use them.

For Example:

  • The labeling at the top of each section is very similar, making it harder to tell if you are in the 'Additional CSS' or 'Per Block CSS' tool. The only visual difference is in the description.
Screenshot 2023-06-23 at 9 31 20 am Screenshot 2023-06-23 at 9 32 05 am

Step-by-step reproduction instructions

  1. Go to the Site Editor and open the styles panel.
  2. Compare the 'Additonal CSS' panel, to a CSS panel when editing the styles for a specific block.

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

@jordesign jordesign added Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. labels Jun 22, 2023
@jordesign
Copy link
Contributor Author

There are some existing PRs in discussion to address some aspects of this issue - but it could probably do with a holistic solution.

Screenshot 2023-06-23 at 9 59 27 am

@richtabor
Copy link
Member

No PR - but could we consider changing the label of the 'Additional CSS' to be clearer that it is global, or site-wide?

Maybe the opposite, “Block CSS”.

@jordesign
Copy link
Contributor Author

Maybe the opposite, “Block CSS”.

That's a good thought - label the more specific instance. I think that would definitely help.

@jasmussen
Copy link
Contributor

Worth noting, I don't think custom CSS is enabled in the core offering quite yet — or am I missing it some details on how to add this? I know it has landed, but not quite sure how to activate it locally. It's clearly active on wp.com where these screenshots are from.

In that light, I'd echo Rich, just noting it as block CSS. But I'll also share the original mockups, which haven't yet been fully implemented:

Global CSS:

Global styles custom CSS

Group CSS:

Group custom CSS

I also recall a conversation around how to scope the group CSS to not bleed, and one of the suggestions were to use :self, which potentially we could lock into place inside the editable field:

Group custom CSS, locked

@richtabor
Copy link
Member

or am I missing it some details on how to add this? I know it has landed, but not quite sure how to activate it locally.

Via the vertical ellipsis menu in the Global Styles sidebar.

@jasmussen
Copy link
Contributor

Ah, we really hid that one didn't we 😅 — I'm sure there's context that steered it away from the original mockups. Thanks.

@richtabor
Copy link
Member

Yea.. perhaps a bit too much. It's a risky thing to put so much emphasis on at the top-level Styles panel though. Perhaps in the future there would be sidebar for developer tools, and it could live in there.

@jordesign
Copy link
Contributor Author

I think the thing will be that there are plenty of non-developers who will use the Additional CSS - prompted via support, forums, tutorials etc. So making it as clear as possible would be great.

@jordesign
Copy link
Contributor Author

I just spotted that the Block-Specific CSS is now under the 'Advanced' section of the sidebar settings - which sets a much better context - so this change of labeling is probably no longer an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants