Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Seedlet & Spearhead Custom Link Color#3325

Merged
scruffian merged 11 commits intotrunkfrom
update/multi-theme-json
Mar 8, 2021
Merged

Seedlet & Spearhead Custom Link Color#3325
scruffian merged 11 commits intotrunkfrom
update/multi-theme-json

Conversation

@pbking
Copy link
Contributor

@pbking pbking commented Feb 22, 2021

Changes proposed in this Pull Request:

Changes the shape (or adds) theme.json files from the following Pull Requests:

Seedlet:
#3271
#3274

Spearhead:
#3133

Related issue(s):

#3243

Diff

D57441-code

@pbking pbking changed the title Update/multi theme json Update Seedlet & Spearhead theme json Feb 22, 2021
@pbking pbking force-pushed the update/multi-theme-json branch from 11981a3 to 948d064 Compare February 22, 2021 17:31
@pbking pbking requested a review from a team February 22, 2021 17:57
@jffng
Copy link
Contributor

jffng commented Feb 22, 2021

Custom link colors are still not working for me in the view:

Editor View
Screen Shot 2021-02-22 at 3 49 10 PM Screen Shot 2021-02-22 at 3 49 17 PM

@scruffian
Copy link
Member

It's not working in the view for me either - I tested in a cover block...

@pbking
Copy link
Contributor Author

pbking commented Feb 23, 2021

I found and fixed an issue with the cover block specifically where the specificity of some anchor styling was preventing the 'link' style from cascading properly.

I suspect there are other blocks with the same situation, I'll comb through spearhead and see where else it might be occurring.

@jeffikus I was unable to reproduce your screenshot however (tested both Spearhead and Seedlet). It only KINDA happened for me when I was testing and had SEEDLET in the editor, switched themes (but didn't reload the editor) and set the color to that green (secondary color) which isn't a color provided by Spearhead so it rolled back to the 'default'. But that seems like I was trying too hard...

@pbking
Copy link
Contributor Author

pbking commented Feb 23, 2021

Shoot...
The "cover block" fix noted above breaks styles when a custom link is NOT applied. Need to re-evaluate further...

@pbking pbking changed the title Update Seedlet & Spearhead theme json Seedlet & Spearhead Custom Link Color Feb 23, 2021
@scruffian scruffian force-pushed the update/multi-theme-json branch from edf6b21 to 63b60fe Compare February 25, 2021 12:32
@scruffian
Copy link
Member

I pushed a fix to Seedlet colors for this, just needs another review...

@MaggieCabrera
Copy link
Contributor

A cover block with custom link color shows differently on the editor vs the frontend:

Editor:
Screenshot 2021-03-02 at 10 19 44

Frontend:
Screenshot 2021-03-02 at 10 19 40

pbking and others added 6 commits March 3, 2021 10:27
This change adds the experimental-theme.json to seedlet so that it can
properly style a link color in the Block Editor.

This JSON structure is correct for Gutenberg < 9.9 and will need to be
updated.
Refactored the experimental-theme.json to fit the structure for the
change as of Gutenberg 9.9
In accordance with
WordPress/gutenberg#28110

the theme.json file has been updated to reflect the new expected shape.
@scruffian scruffian force-pushed the update/multi-theme-json branch from 63b60fe to 4d3697a Compare March 3, 2021 10:34
@scruffian
Copy link
Member

Yeah sorry I forgot to update the editor styles too. Should be good to go now...

@pbking
Copy link
Contributor Author

pbking commented Mar 3, 2021

In the editor, in a GROUP with background {Primary}
A P with link-color set to {Foreground} renders correctly in the editor
image
but not so in the view:
image
Perhaps .has-link-color should be included in
.has-background:not(.has-background-background-color) a:not(.has-text-color):not(.wp-block-button__link) which is coloring the link to 'currentColor'.

@scruffian
Copy link
Member

This will be a lot easier to resolve once this is fixed: WordPress/gutenberg#29557

@scruffian
Copy link
Member

scruffian commented Mar 4, 2021

I removed a bunch of code from Seedlet to fix this. Some of this code was added in this PR: #3088

I think if you run the latest version of Gutenberg it will all work as expected, but there could be more cases I've not considered...

Screenshot 2021-03-04 at 13 09 11

Copy link
Contributor

@MaggieCabrera MaggieCabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not get this to break, it looks good to me!

@scruffian scruffian merged commit 148b05b into trunk Mar 8, 2021
@scruffian scruffian deleted the update/multi-theme-json branch March 8, 2021 10:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants