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

Add support for page title styles within editor-styles. #10485

Closed
kjellr opened this issue Oct 10, 2018 · 3 comments
Closed

Add support for page title styles within editor-styles. #10485

kjellr opened this issue Oct 10, 2018 · 3 comments
Labels
Customization Issues related to Phase 2: Customization efforts [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Enhancement A suggestion for improvement.

Comments

@kjellr
Copy link
Contributor

kjellr commented Oct 10, 2018

Theme authors can customize the page title style by enqueuing a stylesheet that includes something like this:

.editor-post-title__block .editor-post-title__input {
	font-family: serif;
}

However, if their theme is using our auto-injected CSS for editor-styles (introduced in #9008), that's not possible.

It's very likely that theme authors will want the page title font/size to match up with the rest of the text in the editor styles, so we should figure out how to make that possible without enqueueing a second editor stylesheet.

cc @youknowriad

@kjellr kjellr added [Type] Enhancement A suggestion for improvement. Customization Issues related to Phase 2: Customization efforts [Feature] Extensibility The ability to extend blocks or the editing experience labels Oct 10, 2018
@nickcernis
Copy link
Contributor

nickcernis commented Oct 19, 2018

This may be solved by #10067 if body is mapped to .edit-post-visual-editor (which contains the .editor-post-title__input element) instead of .editor-block-list__block (which does not).

You would be able to do something like this in editor styles:

body .editor-post-title__block .editor-post-title__input {
	font-family: serif;
}

And Gutenberg would map it to this, which will affect the page title:

.edit-post-visual-editor .editor-post-title__block .editor-post-title__input {
	font-family: serif;
}

@nickcernis
Copy link
Contributor

Noting this now works for me in the editor stylesheet as of WP 5.0 Beta 3:

.editor-post-title__block .editor-post-title__input {
	font-family: serif;
}

This can likely be closed as a result.

@youknowriad
Copy link
Contributor

Awesome thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customization Issues related to Phase 2: Customization efforts [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants