If you have a views table with sticky headers. If the header becomes sticky it completly loses it's style, including borders, background colors.
At least these seems missing/changing:
- table.sticky-header th (padding)
- table.sticky-header th.active (background color)
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 2840308-14-8.x-3.x.patch | 1.79 KB | markhalliwell |
| #13 | interdiff-2840308-12-13-D7.patch | 1.18 KB | mustanggb |
| #13 | bootstrap-2840308-13-D7.patch | 6.63 KB | mustanggb |
Comments
Comment #2
hass commentedComment #3
hass commentedHell, I guess I found the reason. The
.tableclass and some others are not added to sticky headers.That is the sticky-header:
Compared to the normal table:
Comment #4
Thew commentedThis should be fixed in 8.x-3.x first.
Comment #5
Thew commentedConfirmed the bug for both D7 and D8.
Screenshots from D8

Normal Table Header
Sticky Table Header without Table class.

Sticky Table Header with Table class.

The solution is to add
.tableclass totable.sticky-headerbut thetable.sticky-headeris generated by Drupal core js. I'm not sure how to fix this.Comment #6
hass commentedWe can replace tableheader.js with a custom bootstrap version. I'm not sure about the effect of bordered table style and other table-* classes. Maybe we also need to add them dynamically because of settings.
Tried to replace just the Dupal.tableheader, but was not successful.
Comment #7
hass commentedThis fixes the issue for D7.
Comment #8
hass commentedComment #9
markhalliwellPlease fix HEAD first...........................
Comment #10
markhalliwellAlso, this is a feature request, not a bug.
Comment #11
mustanggb commented@hass Tried your D7 version, it works great for adding the missing classes, but doesn't take into account the horizontal scrolling we now have due to
.table-responsive.Comment #12
mustanggb commentedAdded a wrapper to #7 to address #11.
Comment #13
mustanggb commentedActually if we use
marginLeftfor the horizontal scrolliness position rather thanleftwe get the added benefit that it works much nicer with "sticky column" code.Comment #14
markhalliwellComment #16
markhalliwellConsidering that the D7 equivalent backport would essentially require us to take ownership of the entire file/plugin, I'm not comfortable adding this feature request to 7.x-3.x at this time. It can remain here as a patch if sites really need it.
Comment #17
markhalliwell