Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#48799 closed defect (bug) (fixed)

"At a Glance" comment count font size is larger than other counts

Reported by: jeremyfelt's profile jeremyfelt Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Administration Keywords: good-first-bug has-patch needs-testing
Focuses: ui, css Cc:

Description

In the WordPress dashboard, on a mobile browser, the font size applied to "At a Glance" items is 13px. This rule is applied via .postbox .inside in common.css.

The .post-count, .page-count, and .comment-mod-count elements all inherit this value.

The .comment-count element differs in that a font-size: 14px; from list-tables.css overrides the postbox value.

.comment-count itself is confusing because I'm pretty sure its only other use is in the post list table when a post has 0 approved comments and 1 or more pending comments. Even then, the 14px style only applies on mobile and in the mobile view that comment count is hidden.

I'm fairly certain that the .comment-count rule in list-tables.css could be removed without consequence, but I'll leave that up to those more familiar. :)

I originally noticed this in Google Chrome on a Pixel 3 and reproduced it in Firefox on a laptop at a 411x731 screen size.

Attachments (3)

Screen Shot 2019-11-26 at 9.50.45 AM.png (101.1 KB) - added by jeremyfelt 6 years ago.
Screen Shot 2019-11-30 at 1.26.42 AM.png (582.3 KB) - added by donmhico 6 years ago.
48799.diff (457 bytes) - added by donmhico 6 years ago.

Download all attachments as: .zip

Change History (11)

#1 @SergeyBiryukov
6 years ago

  • Component changed from General to Administration
  • Focuses ui added

#2 @SergeyBiryukov
6 years ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

This ticket was mentioned in Slack in #core by sergey. View the logs.


6 years ago

#4 @donmhico
6 years ago

I think you're right @jeremyfelt. I did some scanning and search in the core code and I don't see any usage of the class .comment-count except for the At a Glance and in the bubble in edit-comments.php but indeed, it is hidden when the .comment-count style from list-tables.css is applied.

@donmhico
6 years ago

#5 @donmhico
6 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#6 @SergeyBiryukov
6 years ago

  • Milestone changed from Future Release to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

Introduced in [26134].

#7 in reply to: ↑ description @SergeyBiryukov
6 years ago

Replying to jeremyfelt:

.comment-count itself is confusing because I'm pretty sure its only other use is in the post list table when a post has 0 approved comments and 1 or more pending comments. Even then, the 14px style only applies on mobile and in the mobile view that comment count is hidden.

Right. Not only it's hidden, but the font size is also overridden by a more specific selector, so the style in question has no effect and can be safely removed. 48799.diff should be good to go.

#8 @SergeyBiryukov
6 years ago

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

In 46807:

Administration: Correct font size for comment count in "At a Glance" dashboard widget on mobile.

Props donmhico, jeremyfelt.
Fixes #48799.

Note: See TracTickets for help on using tickets.