WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#19453 closed defect (bug) (fixed)

CSS for bulleted un/ordered lists in wp-admin not working

Reported by: trepmal Owned by: ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.3
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Ordered and unordered lists in the admin are a bit naked, even when the predefined classes are used.

The classes (ul-disc, ul-square, ol-decimal) aren't used much in core. At a glance, it looks like ul-disc is the only class used, and it adds bullets to the list of files that would be deleted upon removing a plugins or network-activated themes.

Here's my test plugin: https://gist.github.com/1436969 - creates a page and meta box, each with 5 lists.
ul, ul.ul-disc, ul.ul-square, ol, ol.ol-decimal

The ul/ol classes aren't quite specific enough to overwrite list-style:none; given to unclassed <li>s. Patch just makes the selectors a bit more specific.

Attachments (6)

wp-admin.dev-bullets.diff (458 bytes) - added by trepmal 3 years ago.
19453.wp32.png (12.2 KB) - added by SergeyBiryukov 3 years ago.
19453.wp33.png (12.2 KB) - added by SergeyBiryukov 3 years ago.
19453.after.png (13.1 KB) - added by SergeyBiryukov 3 years ago.
With wp-admin.dev-bullets.diff
19453.patch (297 bytes) - added by azaozz 3 years ago.
19453.2.diff (573 bytes) - added by koopersmith 3 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 @nacin3 years ago

  • Version changed from 3.3 to 2.7

comment:2 follow-up: @trepmal3 years ago

The classes seemed to be working just fine on 3.2.1 - but maybe I tested too quickly...

@SergeyBiryukov3 years ago

@SergeyBiryukov3 years ago

@SergeyBiryukov3 years ago

With wp-admin.dev-bullets.diff

comment:3 in reply to: ↑ 2 @SergeyBiryukov3 years ago

  • Version changed from 2.7 to 3.3

Replying to trepmal:

The classes seemed to be working just fine on 3.2.1

Yeah, it's actually a regression. Seems to be introduced in [18577].

I've made screenshots to illustrate.

comment:4 @nacin3 years ago

  • Milestone changed from Awaiting Review to 3.3

comment:5 @azaozz3 years ago

Looks like in 3.2 and earlier the reset was only on the parents ul, ol {list-style: none;} and then OLs were set to list-style-type: decimal; so they were always with numbers.

To fully restore that we need to change:

ul li,
ol li {
	list-style: none;
}

to:

ul {
	list-style: none;
}

@azaozz3 years ago

@koopersmith3 years ago

comment:6 @koopersmith3 years ago

I've uploaded a new patch that tweaks the selectors in attachment:wp-admin.dev-bullets.diff and includes attachment:19453.patch.

For the first patch — those selectors are used in 3.2, but not to specify the list-style property. See these selectors in the 3.2 branch.

comment:7 @azaozz3 years ago

Looks good.

comment:8 @ryan3 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [19576]:

Fix list styling. Props koopersmith, azaozz, trepmal. fixes #19453

Note: See TracTickets for help on using tickets.