Opened 5 years ago

Closed 5 years ago

#31349 closed Cleanup/optimization (fixed)

Change admin to use :nth-child() CSS selector for alternating rows

Reported by: Jon Dufresne Owned by: Jon Dufresne
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child

  • Reduces logic and markup in admin templates -- no {% cycle "row1" "row2" %}.
  • Reduces logic in JavaScript -- no need to adjust row1 and row2 classes.
  • Offloads work to a native browser feature.

Change History (4)

comment:2 by Claude Paroz, 5 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 5 years ago

Owner: changed from nobody to Jon Dufresne
Status: newassigned
Triage Stage: AcceptedReady for checkin

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In eb77e80d:

Fixed #31349 -- Used :nth-child() CSS pseudo-class to style alternative rows in admin.

Note: See TracTickets for help on using tickets.
Back to Top