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: Attributes and Controls #20370

Closed
ItsJonQ opened this issue Feb 21, 2020 · 1 comment
Closed

Global Styles: Attributes and Controls #20370

ItsJonQ opened this issue Feb 21, 2020 · 1 comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json

Comments

@ItsJonQ
Copy link

ItsJonQ commented Feb 21, 2020

(This details some of the requirements specified in #20331)

As we dive deeper into the system, we realized that we needed a better mechanism to handle Block attributes and the controls used to update them.

If we distill attributes down, we can bucket them into 2 "types":

Styles and Functionality.

Design vs. configuration.
"Color" vs. "Drop cap" (for paragraph)

The core system should have a way to recognize certain Block attributes, and perhaps automatically render certain controls as required.

For example, if "fontSize" is needed, then the FontSize controls would render.

At the moment, blocks must manually "setup" of attributes and controls. Tying this together in an ad-hoc manner. Also, certain attributes (color, fontSize), are (in a way) bound to blocks, making it difficult to be accessed outside.

This detail is important if we want Attributes and Controls to be shared between the Post Editing and Site Editing/Global Styles Editing experience.


That being said. If absolutely required, we can perhaps work around this to for the sake of prototype/demo.

However, this unified mechanism of Attribute x Control needs to be solved for Global Styles to work seamlessly with the editing experience.

@ItsJonQ ItsJonQ added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Feb 21, 2020
@oandregal
Copy link
Member

Ah, this is a walk down on memory lane! We've come far since this was discussed and we now have an initial system for this already. Closing this and pointing people to the more specific #22700

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

No branches or pull requests

2 participants