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

Add oik-block/blockstyles block to display information about a block's styling #44

Open
1 task
bobbingwide opened this issue May 17, 2021 · 0 comments
Open
1 task
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

With Full Site Editing coming along soon, a block's CSS styling may be defined using theme.json and the block's block.json file.
As I understand it, the theme can override the block's default styling by using theme.json
And I imagine other code can override the block's styling during registration.

But how can you tell, in advance from the front end, how the block's settings and styling are defined?

The block.json file defines the default supports and the names of the style files for the block: editor and front end.

eg for the cover block

"supports": {
		"anchor": true,
		"align": true,
		"html": false,
		"spacing": {
			"padding": true
		},
		"color": {
			"__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
			"text": false,
			"background": false
		}
	},
	"editorStyle": "wp-block-cover-editor",
	"style": "wp-block-cover"

There are sections in theme.json which define settings, which I believe are similar to supports, and others which define the styles.
The settings may or may not trump the block's supports values
and the styles define the allowed values for the theme.

Requirement

  • Display settings and styling information for chosen selected block in the front end.

Proposed solution

  • TBC
@bobbingwide bobbingwide added the enhancement New feature or request label May 17, 2021
@bobbingwide bobbingwide self-assigned this May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant