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

Default line height is very tight #34397

Closed
kjellr opened this issue Aug 30, 2021 · 3 comments · Fixed by #34439
Closed

Default line height is very tight #34397

kjellr opened this issue Aug 30, 2021 · 3 comments · Fixed by #34439
Assignees
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@kjellr
Copy link
Contributor

kjellr commented Aug 30, 2021

Description

When a theme does not provide editor styles, the default line height appears very tight:

Screen Shot 2021-08-30 at 4 05 44 PM

This stems from the reset value here:

Screen Shot 2021-08-30 at 4 15 08 PM

If I remove that, it inherits the WP-Admin default of 1.5, which looks a little nicer. 1.6 or so would be more comfortable, but I'm not sure exactly what our "reset" strategy is here... the resets are in place so as to not override theme-provided styles, but I imagine we're also aiming to provide some nice defaults for when themes don't provide any editor styles, right? Do we handle those defaults somewhere else?

Possibly related to #31211

Step-by-step reproduction instructions

  1. Activate the Gutenberg plugin
  2. Activate a theme that does not provide editor styles (I used Isola).
  3. Edit a post.
  4. Note the tight line height.

Environment info

Gutenberg 11.3.0

@kjellr kjellr added the [Type] Bug An existing feature does not function as intended label Aug 30, 2021
@kjellr
Copy link
Contributor Author

kjellr commented Aug 30, 2021

cc @jasmussen when you're around — I feel like you have more knowledge of these resets than I do.

@kjellr kjellr added the CSS Styling Related to editor and front end styles, CSS-specific issues. label Aug 30, 2021
@jasmussen
Copy link
Contributor

Hey, thanks for the ping. There's a bit of context in this comment:

The intent of serif is to override the font that comes by default from wp-admin common styles and restore the browser default.
and if I just checked WP core's code the default font is not added anymore unless the theme doesn't provide a theme.json file. So my question would be, what WP version are you testing with?

The comment seems to suggest that the system fonts are only output for classic themes. Which means we might be able to output a line-height there as well. But this would likely require a core patch to output that same line-height in context of the rule that outputs system fonts.

@kjellr
Copy link
Contributor Author

kjellr commented Aug 31, 2021

Hmm ok. Core does provide a default line height, but Gutenberg's reset styles override it. 😕 Presumably we'd need to have core provide a more specific rule?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
3 participants