Problem/Motivation

As a consequence of this Dropbutton style update for Seven, the vertical-align of td,th is changed from 'middle' to 'top' causing bad alignment of the texts inside certain listing views such as Content, People, Views etc.

Views listing text alignment
Content listing text alignment

Expected behavior

The texts should stay vertically centered within the table rows.

Proposed resolution

Restore 'middle' value for vertical-align of td,th and at the same time make sure the alignment of buttons is not affected.

Remaining tasks

Remove !important from latest patch, making sure the selector is still strong enough to apply.
Anti regression screenshots

User interface changes

Listing views created with tables will look better

API changes

None

Comments

ngocketit’s picture

Issue summary: View changes
ngocketit’s picture

Patch attached.

ngocketit’s picture

A similar patch for Views is needed too but I guess we should do that in a new issue.

lauriii’s picture

Status: Active » Needs work

I think we can do the change needed for Views also in this issue.

lewisnyman’s picture

I actually think we should do the views patch separately, because the Views UI might require a slightly different design.

  1. +++ b/core/themes/seven/css/components/dropbutton.component.css
    @@ -128,6 +128,8 @@
     .dropbutton-single .dropbutton-widget {
       border: 0;
    +  position: static !important;
    +  display: inline-block;
    

    I'm not sure why we have these changes?

  2. +++ b/core/themes/seven/style.css
    @@ -608,7 +608,7 @@ tbody tr:hover {
     th {
    -  vertical-align: top;
    +  vertical-align: middle;
     }
    

    It looks like middle is actually the default browser styling, so we could delete this CSS completely?

ngocketit’s picture

I created a new issue and attached a simple patch for views_ui at Texts are not vertically aligned in Views list. About the default browser styling, it seems that the value is 'baseline' (vertical-align default value), not 'middle' and since the implementation may differ from browser to browser, I think it's no harm to keep 'vertical-align: middle' explicitly.

ngocketit’s picture

Status: Needs work » Needs review
g-raph’s picture

StatusFileSize
new861 bytes

I agree. "Vertical-align: middle" is no harm. I reviewed this patch and it fixes this issue. But since the latest version of core, the 'core/theme/seven/style.css' file doesn't exist anymore. Now the styling is in '/core/themes/seven/components/tables.css'.

So new patch in attach. (And let's hope that sevens filestructure doesn't change anymore.)

nathanlawsn’s picture

StatusFileSize
new39.75 KB

Tested the patch, all good.

Screenshot attached.

lewisnyman’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs screenshots

I don't see any dropbuttons in the above screenshot? We need screenshots from a variety of pages to make sure we don't cause regressions elsewhere. Here are some suggestions:

  • Views listing
  • View Edit page
  • Content type listing

Also the suggestions I made in #5 are still present so keeping this on needs work. We shouldn't need to use !important. I looked up the documentation for vertical align and the default is actually baseline, so we don't need to change this. I updated the remaining tasks.

nathanlawsn’s picture

Oops, sorry. First time getting involved in the issue queues, so please excuse me if I overlook something.

Screenshots attached of dropbuttons. The vertical alignment looks to be unaffected, though I have noticed the font size of the dropbuttons on the Views listing/edit page is inconsistent with those on the Content type listing.

Table rows are still top vertically aligned on the Views listing page also.

g-raph’s picture

Status: Needs work » Needs review
Issue tags: +Amsterdam2014
StatusFileSize
new494 bytes
new850 bytes
new1.15 MB

I did the asked change from #10.
I removed the !important on the dropdown-widget position: static. And indeed, there is no need to use an !important.

New patch in attach!

Here are some testing screenshots, looks good IMO:

eftimitac’s picture

Verified on Chrome(Mac) and IE9(Win7)
Looks much better now, but can you please vertically inline description row for admin/structure/views page?
See the screenshot:
http://goo.gl/oEnomd

g-raph’s picture

Hi eftimitac,

Views table alignment is in a new issue "Texts are not vertically aligned in Views list" (see comment #5 and #6).

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs screenshots

I also ran over all the pages, just to double check. I think we are good to go. This only affects the Seven theme.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 63a6e44 and pushed to 8.0.x. Thanks!

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

Status: Fixed » Closed (fixed)

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

bwinett’s picture

Documenting that #2349829: #2293589 breaks table row buttons now lists this issue as its parent. Note that #2349829: #2293589 breaks table row buttons is now RTBC.