-
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
Make global styles shape consistent with local styles shape. #22744
Make global styles shape consistent with local styles shape. #22744
Conversation
b85f545
to
3213429
Compare
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
182b137
to
4b505ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lovely PR, thanks.
@jorgefilipecosta actually, I forgot to mention that we need to update the docs for theme.json. We can land this after that and fixing the linting errors. To make progress, I've already ported the get utility to #22698 I'll deal with the rebase as soon as this lands. |
ac21383
to
a415c69
Compare
Co-authored-by: Andrés <[email protected]> (+1 squashed commit) Squashed commits: [3213429] Update: Make global styles shape consistent with local styles shape.
a415c69
to
b60733d
Compare
Hi @nosolosw Thank you for the review the PR was merged and the documentation was updated 👍 |
Currently, for the shape of the local style we are using something like this:
While for global styles we were using the shape:
We should use the same shape and this PR updates the global styles shape to be similar to what we had for local styles.
There is still one inconsistency for local styles we call "style" and for global styles, we call "styles". Should we update global styles to use "style"?
Besides this update we also perform smaller updates required to have a link color end to end implementation:
- We add a setting __experimentalGlobalStyles containing the full global styles required to show the defaults including user-set global styles.
- We unconditional include the default styles even if the theme does not has theme.json support. I guess even if the theme does not contain theme.json we may want to allow users to change the link color, and even change it globally and for that, we need a default even if for themes that don't have theme.json.
How has this been tested?
I added this after global to /lib/experimental-default-theme.json:
I verified the following styles were output: