-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Provide color panel for core/post-content
#50327
Comments
While enabling the color supports themselves is straightforward there are a few edge cases around the PostContent block. From memory, we don't have access to an individual post content block instance's attributes in the post editor and so can't reflect block-specific styles there. For example, a user specifies colors on the PostContent block in the Single template, then switches to the post editor, they won't see their color selections applied. This comment when we added typography supports illustrates this issue to a degree as well. After enabling the color supports, any theme.json/global styles applied colors are reflected in both editors. Finding a neat solution that doesn't increase the disparity between the editors, while meeting user expectations, may be quite tricky. Would it be acceptable to start out with enabling only the link color for the PostContent block? Would its use be mainly at a global styles level, minimising the issue with the post editor? |
Agreed, it's tricky, however, the disparity already exists for themes that choose to style things using I think some of the work in merging the editors might help resolve some of this disparity. I think there has also been some conversation about exposing elements of the Post Content Block in the post editor so that context is available. It seems like a missing piece here. |
Exactly. Until we have that, I'd be reluctant to increase the disparity between editors. |
This is the same problem that we have with the navigation block in focus mode (#39286). When the block is focussed we lose the context of the template, and the specific styles applied to that instance of the navigation block. I feel like this is a fair compromise, since you are editing content outside of the context in which it will finally be loaded. cc @getdave for a second opinion. |
In fact, I don't think this is even possible. A single post could be loaded in multiple contexts - for example the single.php, or the home page, or an archive/tag/category page. In each instance it is possible for it to have different styles depending on the color settings given by the context of the template. |
Tested PR #51326 on gutenberg.run/51326
|
Usability Feedback on how to set the look & feel for base elements like link textWith a blank mental state (prior reporting #51265) I had expected to set the global look & feel for links in the Inspector sections "Colors → Links" and "Typography → Links". That all this shall take part in "Blocks → Content Type" is not intuitive for newcomers.
Some Inspector Panels and how the deal with itColors → Links
Typography → Links
What I realize now in general between "Colors" and "Typography" on the top level of "Styles" is that the pseudo-classes like Hover are only represented in Colors, not typography. Is there an epic-issue which deals with this larger topic of how these state-depending formatting gets manage-able in Gutenberg? |
|
We had an example of this issue in the support forums. |
What problem does this address?
Themes have the ability to define element color styles for the
core/post-content
block (container), however there are no user level interfaces for modifying those styles. For example, a theme could have something like this in itstheme.json
:However there is no color panel for modifying the block level styling for this block:
What is your proposed solution?
Enable color supports for the
core/post-content
block.The text was updated successfully, but these errors were encountered: