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

theme.json: The outline property does not work properly on the editor #44502

Closed
t-hamano opened this issue Sep 27, 2022 · 0 comments · Fixed by #44504
Closed

theme.json: The outline property does not work properly on the editor #44502

t-hamano opened this issue Sep 27, 2022 · 0 comments · Fixed by #44504
Assignees
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json

Comments

@t-hamano
Copy link
Contributor

Description

The outline property does not work properly in the editor. The following are either not applied or incorrect values are applied on the editor:

styles.outline

Not work on the site editor.

styles.blocks.{namespace/blockName}.outline

Not work on the post / site editor..

styles.elements.button.outline

The incorrect outline-color property is applied and the outline-offset property is not on the site editor.

button

styles.h{X}.outline

The incorrect outline-color property is applied and the outline-offset property is not on the site editor.

h2

Step-by-step reproduction instructions

In the active theme, define theme.json as follows:

theme.json
{
	"$schema": "https://schemas.wp.org/trunk/theme.json",
	"version": 2,
	"settings": {
		"appearanceTools": true,
		"layout": {
			"contentSize": "840px"
		}
	},
	"styles": {
		"outline": {
			"offset": "2px",
			"width": "4px",
			"style": "dashed",
			"color": "red"
		},
		"blocks": {
			"core/paragraph": {
				"outline": {
					"offset": "2px",
					"width": "4px",
					"style": "dashed",
					"color": "red"
				}
			}
		},
		"elements": {
			"button": {
				"outline": {
					"offset": "2px",
					"width": "4px",
					"style": "dashed",
					"color": "red"
				},
				":active": {
					"outline": {
						"offset": "2px",
						"width": "4px",
						"style": "dashed",
						"color": "green"
					}
				},
				":focus": {
					"outline": {
						"offset": "2px",
						"width": "4px",
						"style": "dashed",
						"color": "yellow"
					}
				},
				":hover": {
					"outline": {
						"offset": "2px",
						"width": "4px",
						"style": "dashed",
						"color": "blue"
					}
				}
			},
			"h2": {
				"outline": {
					"offset": "2px",
					"width": "4px",
					"style": "dashed",
					"color": "red"
				}
			}
		}
	}
}

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress: 6.1-beta1-54304
  • Gutenberg: 14.2.0-rc.1

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

@t-hamano t-hamano added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Sep 27, 2022
@t-hamano t-hamano self-assigned this Sep 27, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 27, 2022
ramonjd added a commit that referenced this issue Sep 28, 2022
Adding unit tests for outline properties
@t-hamano t-hamano removed the [Status] In Progress Tracking issues with work in progress label Sep 28, 2022
ramonjd added a commit that referenced this issue Sep 28, 2022
* Follow up for #44502 and #43526
Adding unit tests for outline properties

* Property order
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant