WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#26060 closed enhancement (fixed)

Add and utilize :nth-child() selectors rather than the .alt(ernate) classes

Reported by: helen Owned by: helen
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: General Keywords: 4.2-beta
Focuses: ui, administration Cc:

Description

Since the new-in-3.8 admin styling is more liberal in allowing IE7 and IE8 to gracefully degrade, we really are overdue to make the jump. This should fix issues with and future-proof list tables that are altered via AJAX, such as comments (#25060). Going to leave the classes in CSS for back-compat.

Attachments (3)

26060.diff (12.8 KB) - added by helen 6 years ago.
26060.2.diff (16.6 KB) - added by helen 6 years ago.
26060.3.diff (20.3 KB) - added by helen 6 years ago.

Download all attachments as: .zip

Change History (17)

#1 @helen
7 years ago

Working on a patch - takes a while to go through all the list tables.

#2 @matt
7 years ago

  • Priority changed from normal to low

#3 @nacin
7 years ago

  • Milestone changed from 3.8 to Future Release

This ticket was mentioned in Slack in #design by helen. View the logs.


6 years ago

@helen
6 years ago

#5 @helen
6 years ago

  • Component changed from Administration to General
  • Focuses administration added
  • Milestone changed from Future Release to 4.2
  • Priority changed from low to normal
  • Type changed from defect (bug) to enhancement

Getting back on this. It should fix #25060 and #30981 at the same time.

@helen
6 years ago

@helen
6 years ago

#6 @helen
6 years ago

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

In 31181:

List tables: Use CSS :nth-child() selectors for zebra striping.

Note that this does not fix issues related to comment quick edit. Internal linking also continues to use the .alternate class for now. IE8 and below gracefully degrade by not having zebra striping.

There is some hoop jumping with adding an extra table row to maintain zebra striping during quick edit. Documenting that here for future reference; it is also in the inline documentation.

fixes #30981 and #26060. see #25060.

#7 @helen
6 years ago

I am optimistic that the above commit fixes this particular ticket, but do please re-open if any issues are noticed (besides what is already documented in #25060).

#8 @Chouby
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

@helen
Since you invited to re-open, I will.

in inline-edit-post.js around line 136, you changed
$(t.what+id).hide().after(editRow);
to
$(t.what+id).hide().before(editRow).before('<tr class="hidden"></tr>');

Is there a particular reason to change from "after" to "before"?

In a plugin, I rely on the fact that the quick edit is inserted after. Of course I could adapt my plugin. But maybe I am not the only one. Would the following be ok for you?
$(t.what+id).hide().after('<tr class="hidden"></tr>').after(editRow);

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


6 years ago

#10 @DrewAPicture
6 years ago

  • Keywords 4.2-beta added

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


6 years ago

#12 @helen
6 years ago

I don't recall why I went with .before(). .after() seems to work just as well, although it doesn't actually need the order switched.

#13 @helen
6 years ago

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

In 31820:

List tables: Go back to inserting quick edit rows after, as some plugins rely on that assumption. Results are the same.

fixes #26060.

#14 @Chouby
6 years ago

Thank you. The problem is solved now :)

Note: See TracTickets for help on using tickets.