-
Notifications
You must be signed in to change notification settings - Fork 110
Try: Add 3 section styles, update Hero: Centered Heading pattern. #151
Conversation
@@ -15,8 +15,8 @@ | |||
<div class="wp-block-group alignfull" style="min-height:0vh;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--40);"> | |||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|40"}},"layout":{"type":"constrained"}} --> | |||
<div class="wp-block-group"> | |||
<!-- wp:heading {"textAlign":"center","level":1,"style":{"spacing":{"margin":{"right":"0","left":"0"},"padding":{"right":"0","left":"0"}},"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast"} --> | |||
<h1 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="margin-right:0;margin-left:0;padding-right:0;padding-left:0">Tell your story</h1> | |||
<!-- wp:heading {"textAlign":"center","level":1,"style":{"spacing":{"margin":{"right":"0","left":"0"},"padding":{"right":"0","left":"0"}}}} --> |
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.
@juanfra let me know if it was intentional to explicitly set the heading color here.
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.
No, it was not intentional.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
"blocks": { | ||
"core/separator": { | ||
"color": { | ||
"text": "color-mix(in srgb, currentColor 25%, transparent)" |
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.
@carolinan @beafialho Let me know if I got this right! I only found a few separator designs in the Figma.
We should remove explicit color application almost everywhere. |
Yes, that was the plan and why the color wasn't added earlier. |
The background color should not be applied, but a section style can be added as a class to the pattern (any pattern). |
}, | ||
"link": { | ||
"color": { | ||
"text": "var(--wp--preset--color--contrast)" |
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.
I think we could remove this, if we used currentColor in the parent theme.json.
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.
Otherwise if the user changes the text color, they'll also need to also change the link color.
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.
Oh yeah, good call!
Nice, yeah that's what I did in this commit. Works well. |
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 so good! Works well for me, and code lalso ooks good.
Screen.Recording.2024-08-29.at.16.03.37.mov
Thanks all for the reviews and input. I'm going to let this one sit unmerged until tomorrow morning, to let this conversation settle, and I'll implement what gets decided. It won't necessarily be set in stone from that point onwards, we'll always be able to change things until the beta period, but it will be good to land this soon, so all new patterns created can use best practices as far as how to apply colors! |
Coming back this morning, it seems like the conversation ended on the same spot that this PR landed on. So I'm going to go ahead and merge, knowing that this is still possible to change after this merge, I'll be happy to address any followups. Thanks all! |
Description
Starts initial work on adding Section styles (#142). In this case, it adds three section styles from this spot in the Figma file:
These use what I believe is the most suggested format for section style slugs (#3),
section-1
,section-2
,section-3
.Additionally, I made a change to the Hero Centered Heading pattern to remove the explicitly set heading color, so that it will inherit the color set on the container instead.
Screenshots
Testing Instructions