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

Expose the Global Styles precedence logic to an endpoint that native mobile editor can use #25049

Closed
pinarol opened this issue Sep 3, 2020 · 1 comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)

Comments

@pinarol
Copy link
Contributor

pinarol commented Sep 3, 2020

lib/global-styles.php merges data from 3 sources:

  • core defaults lib/experimental-theme.json
  • theme defaults (experimental-theme.json found in the theme dir)
  • user defaults (things the user saved through the global ui interface)

Later origins take precedence, so, for example, if the user has set up a font-size value for the paragraph block it'll take precedence from the value from the theme origin.

We need to extract the parts of lib/global-styles.php that makes sense for mobile to an endpoint.

Prioritization:

For the first iteration we are interested in supporting colors (text, background, links, gradients)

But it is important to keep an eye on spacing (margin, padding) settings for upcoming features, at least to make sure it is applicable on mobile.

More context: #24165

@pinarol pinarol added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Sep 3, 2020
@geriux
Copy link
Member

geriux commented Jun 1, 2021

Closing since this was implemented in #29969

@geriux geriux closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

No branches or pull requests

2 participants