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

What's the secret to getting Link Colour to appear? #4

Open
bobbingwide opened this issue Jul 25, 2021 · 4 comments
Open

What's the secret to getting Link Colour to appear? #4

bobbingwide opened this issue Jul 25, 2021 · 4 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@bobbingwide
Copy link
Owner

For both the Post Edit block and the UK tides block I want to be able to customize the foreground and background colours for both the text and the link. Getting the Link Colour settings pane to appear is not an easy task.
It appears for Fizzie and ThisIs, both using Gutenberg, but not for other themes.
What's the secret?

Colour settings for the Post Edit block using the ThisIs theme. ( WP 5.7.2 GB 11.0.0 )

image

Colour settings using the Fizzie theme ( WP 5.7.2 GB 11.1.0 )

image

@bobbingwide bobbingwide added help wanted Extra attention is needed question Further information is requested labels Jul 25, 2021
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 25, 2021

I understand it's to do with theme.json.
By default settings.color.link defaults to false for both FSE and normal themes.
If you set it to true then the Link Colour settings should appear.
Note the inconsistent capitalisation of Color/Colour in this panel.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 25, 2021

It works for Fizzie, ThisIs..., Wizzie and Written. Can't test with SB at present.
It doesn't appear to work with other themes with WordPress 5.8.

Oh, it's working now in s.b/wordpress with the oobit theme with theme.json set to:

{
  "version": 1,
  "settings": {
    "color": {
      "link": true
    },
    "spacing": {
      "customPadding": true
    },
    "typography": {
      "customLineHeight": true,
      "fontFamilies": [],
      "fontSizes": []
    },
    "layout": {

    }
  }
}

but NOT in s.b/cwiccer with the same theme!

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 25, 2021

but NOT in s.b/cwiccer with the same theme!

Oops, oobit in cwiccer was old. It wasn't symlinked. So there was no theme.json.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Feb 23, 2023

Env Gutenberg version Theme Colour fields available?
s.b/wp55 14.5.0 ThisIs Background, Link
s.b/wp55 14.6.0 ThisIs Background, Link
s.b/wp55 & sneak-peek.me 14.6.1 ThisIs Background, Link
s.b/wp55 14.7 ThisIs Background, Link
s.b/wp55 14.8.4 ThisIs Background, Link
s.b/wp55 14.9.1 ThisIs Background, Link
s.b/wp55 15.0.0 ThisIs Background, Link
s.b/wp55 15.0.1 ThisIs Background, Link
s.b/wp55 15.1.0 ThisIs Background, Link
s.b/wp55 15.1.1 ThisIs Background, Link
s.b/wp55 15.2.0 ThisIs Background, Link
  • In sneak-peek.me the Text color was also displayed.
  • The results for s.b/wp55 reflect the newer settings in block.json where text is set to false.
"color": {
	  "gradients": true,
	  "text": false,
	  "background": true,
	  "link": true
	},
  • We don't need text since the block only displays a link.
  • From GB 15.1.0 the styles appear in a separate tab.
  • In GB 15.2.0 there are more panels for Typography, but not Dimensions.
    image

For reference see https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant