-
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
Global Styles: Styles specificity and users expectations #44931
Comments
/cc @WordPress/block-themers |
I'm not sure changing the order of the panels is a good solution for this. It will help the user that wants to edit a site, but maybe not one who is building one: a case where you want them editing from the global to the specific. I wonder if there's a way we can inform the user where changes from a block are coming from, so they don't need to think about the "cascade". Maybe this information could only be shown in Global Styles in the cases where overrides of styles are possible? I guess that can get convoluted really fast... |
I can also think of cases where elements are the only way (so far!) to edit the styles of a block partially: this is the case of the search and file blocks. Burying the option to change elements can end up being confusing or having the user change things twice, once in the block and then in the element, defeating the purpose of having the more global solution. |
Yeah, the order and hierarchy is fine, it's just that we should display when there are Block Type styles set by the user or theme that are relevant for the category element you are in — if you are editing the "Headings" element we should show and allow access to the Heading, Post Title, Archive Title, Site Title blocks, etc. Buttons is the same — when editing the generic element we should show the block type in context and as a shortcut. |
I know that notices are a lazy solution, but maybe reminding that element styles are overridden by block styles could be a good start. 🤔
I'm having a hard time visualizing this in my mind, especially in a way that wouldn't overload info. |
#45086 is related to this |
CSS is hard; getting it right while translating it into a user-friendly interface is even harder.
In a GS world, the site's styles can originate from many, many sources: editor default, theme.json and style variations, Global Styles of various nature, individual block styles, custom CSS somewhere, etc.
It's a confusing scenario for the end user, even if tech-savvy, who might not know those sources, or understand how they interact with each other.
In a recent test we ran, we discovered that there's a subtle but important difference between "blocks" and "elements" that I personally never fully realized before.
While in most cases all our design tools affect blocks, these items here affect actual HTML elements:
It is reasonable, technically sound, and translates visually what we used to do in code, in CSS or in the theme.json.
Though, when rendered, element customizations have a lower priority than block customizations.
Again, this is technically correct: HTML elements are more generic than blocks, and it's just right that block styles have precedence.
But it's also very confusing how we have element customization items in the main GS panel (so in a top-priority position) that, when changed, might not do anything to the canvas.
It is a common scenario that themes explicitly define styles for the Heading and Button blocks, which will always override any changes in the Global Styles' elements panels.
I wonder if we should de-prioritize the location of the element panels, since they are technically less !important (CSS pun intended) than literally everything else in the GS panel.
cc a bunch of people related to GS that I know of: @carolinan @annezazu @scruffian @MaggieCabrera @mikachan @oandregal @jorgefilipecosta
Context: this rabbit hole started here and continued here, before finally landing into this issue.
The text was updated successfully, but these errors were encountered: