Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45421 closed defect (bug) (fixed)

Twenty Eleven: Font size used in error instead of font weight, in editor-blocks.css

Reported by: laurelfulford's profile laurelfulford Owned by: laurelfulford's profile laurelfulford
Milestone: 5.0.2 Priority: normal
Severity: normal Version: 5.0
Component: Bundled Theme Keywords: has-patch commit fixed-5.0
Focuses: Cc:

Description

In editor-blocks.css on line 26, the styles incorrectly set font-size: 300 where it should be font-weight: 300. This can effect font size in some browsers (will follow up with further details!).

Copied over from this comment: https://core.trac.wordpress.org/ticket/45039#comment:10; thanks to @gonzomir for the report!

Attachments (1)

45421.patch (531 bytes) - added by laurelfulford 6 years ago.

Download all attachments as: .zip

Change History (13)

@laurelfulford
6 years ago

#1 @gonzomir
6 years ago

The problem is visible only when there's some output from error reposting. When WP_DEBUG is false everything looks fine, but when it's true and there is error reporting output in the page the browser switches to quirks mode and interprets the rule differently. I tested with Firefox 63.0 on Ubuntu.

Screenshots:

with WP_DEBUG = false
https://screenshots.firefox.com/c5wQbrTHfw4HQlaZ/kaksepishe.wp.local

with WP_DEBUG = true
https://screenshots.firefox.com/7u9sllgs3lN4VNxn/kaksepishe.wp.local

#2 @gonzomir
6 years ago

I just tested with Chrome 59 and it behaves the same, the error output being the trigger of the issue.

#3 @laurelfulford
6 years ago

Thank you for the extra details, @gonzomir! :)

#4 @davidakennedy
6 years ago

  • Keywords commit added; needs-testing removed

Even though this is an edge case in terms of the bug showing, it's still good to fix it soon. So, @laurelfulford, looks good to me.

#5 @laurelfulford
6 years ago

  • Milestone changed from 5.0 to 5.0.1

#6 @Joen
6 years ago

Thank you for this.

However the default block appender recently (around 4.3 or 4.4 IIRC) changed from being an input field, to be a textarea.

So this:

.editor-default-block-appender input[type="text"].editor-default-block-appender__content {

should be this:

.editor-default-block-appender textarea.editor-default-block-appender__content {

Before: https://cloudup.com/cKJ8nafl9XI

After: https://cloudup.com/cIgMjCLRCJv

Sorry to note that this change (from specifying input to specifying the textarea instead) is also necessary for the other Twenty themes, excluding 2019.

Last edited 6 years ago by Joen (previous) (diff)

#7 @laurelfulford
6 years ago

the default block appender recently (around 4.3 or 4.4 IIRC) changed from being an input field, to be a textarea.

Thanks @joen! This issue has been trac'd and patched in #45450!

#8 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#9 @laurelfulford
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 44190:

Twenty Eleven: Correct block editor font-size issue.

Update a mistake in Twenty Eleven's block editor styles that erroneously sets the font-size to 300, when it should set the font-weight to 300. This was causing browsers in quirks mode to make the editor font size very large.

Fixes #45421.

#10 @desrosj
6 years ago

  • Keywords fixed-5.0 added

Reopening and marking fixed-5.0 so that this can be properly merged into trunk.

#11 @SergeyBiryukov
6 years ago

  • Keywords changed from has-patch, commit, fixed-5.0 to has-patch commit fixed-5.0
  • Resolution fixed deleted
  • Status changed from closed to reopened

#12 @desrosj
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 44301:

Twenty Eleven: Correct font-size and button issues.

Update a mistake in Twenty Eleven's block editor styles that erroneously sets the font-size to 300, when it should set the font-weight to 300. This was causing browsers in quirks mode to make the editor font size very large.

Also, simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

Props laurelfulford.

Merges [44190] and [44191] to trunk.

Fixes #45421, #45433.

Note: See TracTickets for help on using tickets.