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

Gutenberg: Predefined Font Sizes #106

Closed
bgardner opened this issue Apr 16, 2018 · 6 comments
Closed

Gutenberg: Predefined Font Sizes #106

bgardner opened this issue Apr 16, 2018 · 6 comments

Comments

@bgardner
Copy link
Contributor

bgardner commented Apr 16, 2018

Currently the Gutenberg editor allows users to specify text sizes: S, M, L, XL

As discussed here, similar to theme colors, it would be great if themes could set those sizes.

Worth nothing that classes are output for each option:

.is-small-text {}
.is-medium-text {}
.is-large-text {}
.is-larger-text {}

If custom font size is used, output is inline style.

@samikeijonen
Copy link

samikeijonen commented Jul 7, 2018

I still see this issue.

  • Add new paragraph block.
  • Set Custom Size to L.
  • It adds inline style style="font-size: 36px;".

What it should do is add class is-large-text so that it would respect what theme wants.

In Core block these happens to be the same font sizes:)

p {
	&.is-small-text {
		font-size: 14px;
	}

	&.is-regular-text {
		font-size: 16px;
	}

	&.is-large-text {
		font-size: 36px;
	}

	&.is-larger-text {
		font-size: 48px;
	}
}

@samikeijonen
Copy link

Ups wrong repo!

Here is the Gutenberg issue.

@bgardner
Copy link
Contributor Author

bgardner added a commit that referenced this issue Jul 30, 2018
@nickcernis
Copy link
Collaborator

Font sizes are now implemented and tested (back end on left, front on right):

https://demo.studiopress.com/genesis-sample-beta/gutenberg/

gutenberg_styles_and_edit_page_ _genesis_framework_ _wordpress

nickcernis pushed a commit that referenced this issue Oct 8, 2018
@stinkykong
Copy link

Are there any recommended guidelines for setting theme font sizes relative to default paragraph size? I see in Genesis Sample default is halfway between M and L. Would users expect M to be same as default? I'm undecided.

@nickcernis
Copy link
Collaborator

@stinkykong The default name for 'M' is 'regular' in the editor-font-sizes theme support, which does imply it's intended to be the same as the default. That's not enforced, though, and I haven't seen a consensus on this either yet.

It's fine to have M differ from the default, in my view. It seems redundant to duplicate the regular font size under another name, and it gives people an extra size option. They can still click reset to restore the default. I'm interested in any other views on this, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants