As derived from Texts are not vertically aligned in listing views and Dropbutton style update for Seven.

Problem/Motivation

Texts in Views list are not vertically centered within the table rows.

Views list text vertical alignment

Expected behavior

The texts should stay vertically centered within the table rows.

Proposed resolution

Change value for vertical-align of td,th from 'top' to 'middle'.

Remaining tasks

Create a patch, test, review

User interface changes

Views list will look better

API changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ngocketit’s picture

ngocketit’s picture

Status: Active » Needs review
dawehner’s picture

It would be great to include a screenshot of after.

ngocketit’s picture

FileSize
71.78 KB
37.85 KB

I attached some screenshots of the UI after applying the fix.

After fix
After fix

dawehner’s picture

Is it just me that this css selector is way to unspecific? Just curious about your thoughts here.

ericski’s picture

I would tend to agree, I'd considering using .views-table

I also question if this /should/ be the expected behavior. Personally I prefer top valign in tables, though I'm quick to admit I'm not a designer/UX expert.

tjtj’s picture

I agree with ericski. I prefer top alignment, and that is what is shown in the Views preview. But displaying the page makes it vertically centered. Why can't we choose the vertical alignment in addition to the horizontal alignment?

LewisNyman’s picture

I'm not sure why there is any views ui specific styling for table cells. Why are they different to every other table in core? Should we be aiming for consistency instead of the preference of every module?

G-raph’s picture

FileSize
511 bytes

I totally agree with Lewis. Since views is in core, we must be consistent and handle a global styling. There is no need for views to overwrite basic styling. If we want an addition for top alignment, then we should make a new issue from that.

I removed the overwriting styles. Patch in attach.

LewisNyman’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
511.14 KB
374.62 KB

I can confirm that the latest patch fixes the problem and displays the Views UI listing the same as other listings, screenshots attached.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue is a unfrozen change (css) as per https://www.drupal.org/core/beta-changes and it's benefits outweigh any disruption. Committed c93819c and pushed to 8.0.x. Thanks!

  • alexpott committed c93819c on 8.0.x
    Issue #2293875 by G-raph, ngocketit: Fixed Texts are not vertically...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.