Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Color palette and font presets are not shown as selected when the combined variation is active #634

Closed
carolinan opened this issue Oct 25, 2024 · 5 comments · Fixed by #635
Assignees
Labels
[Type] Bug An existing feature does not function as intended.

Comments

@carolinan
Copy link
Contributor

carolinan commented Oct 25, 2024

Description

I am lifting this out of #237
In this issue I am trying to summarize and find out why the matching color and typography presets are not showing as selected under
Appearance > Editor > Styles.

But I am hesitant to address this if the colors are going to be changed in any of the open pull requests, it will create more work and merge conflicts.


Dusk:
I made a file comparison and the color preset and the combined variation do match, so I can't tell why the Dusk color palette is not selected when the Dusk theme variation is selected.


Morning
I made a file comparison, and in the color preset, there is a difference in the button styles for section style four:

Theme variation:

"button": {
						"color": {
							"background": "var:preset|color|accent-1",
							"text": "var:preset|color|contrast"
						},
						":hover": {
							"color": {
								"background": "color-mix(in srgb, var(--wp--preset--color--accent-1) 85%, transparent)",
								"text": "var:preset|color|contrast"
							}
						}
					},

Color preset:

					"button": {
						"color": {
							"background": "var:preset|color|accent-1",
							"text": "var:preset|color|contrast"
						},
						":hover": {
							"color": {
								"background": "color-mix(in srgb, var(--wp--preset--color--accent-1) 85%, transparent)"
							}
						}
					},

If the button text color is added to the color preset, then the Morning color palette shows as selected when the Morning theme variation is selected.


Midnight

I did a file comparison and in the Midnight color preset file, the duotone is missing.
If the duotone is added to settings > colors, then the Midnight color palette shows as selected when the Midnight theme variation is selected.

@carolinan carolinan added the [Type] Bug An existing feature does not function as intended. label Oct 25, 2024
@carolinan carolinan changed the title Color or palette presets are not shown as selected when the combined variation is active Color palette and font presets are not shown as selected when the combined variation is active Oct 25, 2024
@carolinan
Copy link
Contributor Author

carolinan commented Oct 25, 2024

@beafialho @juanfra
As Bea noted in #237, Afternoon and the preset does not match, but I found that it is not related to 237, it also happens on "trunk".
When I did a file comparison between the Afternoon theme style variation and its typography preset, the typography styles are very different.
I believe that when Afternoon was updated in #564, the typography preset was simply missed.

@juanfra juanfra self-assigned this Oct 25, 2024
@juanfra
Copy link
Member

juanfra commented Oct 25, 2024

Thanks Carolina, I'll be working to fix this.

@carolinan
Copy link
Contributor Author

When I do I file comparison between the Sunrise theme style variation and typography preset 6,
the typography preset has this extra block style, which is not present in Sunrise:

			"core/query-title": {
				"typography": {
					"fontWeight": "800"
				}
			},

@carolinan
Copy link
Contributor Author

And finally, when comparing Midnight with typography preset 7, the elements > button > typography is not the same:

Midnight:

				"typography": {
					"fontFamily": "var:preset|font-family|literata",
					"fontSize": "var:preset|font-size|medium",
					"fontWeight": "400",
					"letterSpacing": "-0.01em",
					"textTransform": "uppercase"
				},

Preset 7:

			"button": {
				"typography": {
					"fontFamily": "var:preset|font-family|literata",
					"fontWeight": "400",
					"textTransform": "uppercase"
				}
			},

@beafialho
Copy link
Contributor

Thanks for opening this issue, Carolina.

That's right, they were perhaps missed when I did the reviews to each variation, so let's make sure they match with the following descriptions I left when I reviewed them:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Type] Bug An existing feature does not function as intended.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants