Off-canvas tabledrag styles do not fully account for "weight" column.

Created on 21 March 2019, over 5 years ago
Updated 28 March 2023, over 1 year ago

Problem/Motivation

Identified as meriting its own issue in #2995689: Allow reordering blocks without a pointer device β†’

This issue is apparent when:

  • A table using tabledrag is in an off-canvas dialog
  • "Show Row Weights" is selected, so the row weights are visible in the table.
    1. The row is being hovered over, or
    2. The row was dragged to a new position prior to enabling "Show Row Weights" but not before saving the new ordering.

In this image, the "Body" row is being hovered over, and "Image (current)" was dragged to a new position.

The "weight" form input should take on the background color of the row it belongs to, but it does not. Instead, the form input background color is #444 determined by the reset rules in off-canvas.base.css

#drupal-off-canvas *, #drupal-off-canvas *:not(div) {
 background: #444;
}

This is because the rules determining background color in off-canvas.tabledrag.css are applied to <td> elements, but do not account for elements inside those <td>s. As a result, they are styled by the rules in off-canvas.base.css mentioned above

Proposed resolution

Add rules to off-canvas.tabledrag.css to address the conflicting background colors.

Remaining tasks

Add/change styles, review, commit.

User interface changes

The weight column in tabledrag assumes the expected behavior of having the background color of the row it is in.

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
CSSΒ  β†’

Last updated 8 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024