Remove inadequate render-blocking styles for jquery.tablesorter
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 28 May 2018 21:04:04 +0000 (23:04 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 28 May 2018 21:28:26 +0000 (23:28 +0200)
commite1940af9b63f127ef3fa7ef4984d6db44ece1c38
tree32b4ee6b559b7588a20237c140ef7b337de89cb4
parent7bfc0f42a305ebd7b1f762edc292a04f0bf72950
Remove inadequate render-blocking styles for jquery.tablesorter

The current styles (from 1b14198df23ec26b44474e24621aeab276cbee5a)
did not actually apply to any elements on the page until
jquery.tablesorter ran: MediaWiki parser does not generate
`<thead>` elements and it's not even allowed as a HTML tag, only
jquery.tablesorter wraps a table header in them.

Instead, they resulted in the padding not being applied inside
VisualEditor editing surface (T195108), because it doesn't run
jquery.tablesorter (and instead manually adds CSS classes for
the sorting icons to appropriate cells).

The original attempt (from 8cdfcc5fd4ba36b7c91ac8097390220de230f8ae)
was a good idea, but I think it is not possible to do this well
enough with just CSS. In addition to unsortable columns (described
in T194451), the header may also consist of multiple rows, with cells
with colspans and rowspans, where only one header cell in each column
should have the sorting icon. This is not possible to implement in
CSS.

This reverts commit 1b14198df23ec26b44474e24621aeab276cbee5a
and parts of 8cdfcc5fd4ba36b7c91ac8097390220de230f8ae.

----

Minimal example of a table where it is impossible to style
appropriate header cells with CSS only:

  {| class="wikitable sortable"
  ! colspan="2" | H1-2
  ! rowspan="2" | H3
  |-
  ! H1 !! H2
  |-
  | A1 || A2 || A3
  |-
  | B1 || B2 || B3
  |}

Bug: T195108
Change-Id: Ife15069b3a2a38d36cb9077e31a82a9fc1a36215
includes/skins/Skin.php
resources/Resources.php
resources/src/jquery.tablesorter/jquery.tablesorter.less
resources/src/jquery/jquery.tablesorter.styles.less [deleted file]