Template:Sort under/styles.css

/* {{pp-template}} */ /** * Reposition sort arrows under column header text in the same cell. * * Table classes: * - sort-under (consensus right) * - sort-…

/* {{pp-template}} */
/**
 * Reposition sort arrows under column header text in the same cell.
 *
 * Table classes:
 * - sort-under (consensus right)
 * - sort-under-center
 *
 * Tested:
 * - Windows 10: (all skins) Chrome, Firefox, Edge.
 * - Android Galaxy S21 (MinervaNeue): Chrome, Firefox.
 * - Wikipedia Android app.
 * - Print: Not styled.
 * - No JavaScript.
 *
 * Note:
 * Can't align {{static row numbers}} column label after sorting when exactly
 * one header row followed by any "sorttop" rows.
 * See Phab:T355492 - "Move sorttop rows from thead to second tbody".
 * Lint error:
 * thead tr:first-child:has(+ tr.sorttop)::before {}
 */
@media screen {
  /**
   * Reclaim old space.
   */
  .sort-under.sortable.wikitable th.headerSort,
  .sort-under-center.sortable.wikitable th.headerSort {
    padding-right: 0.4em;
  }
  .sort-under.sortable:not(.wikitable) th.headerSort,
  .sort-under-center.sortable:not(.wikitable) th.headerSort {
    padding-right: 1px;
  }
  body.skin-minerva .sort-under.sortable.wikitable th.headerSort,
  body.skin-minerva .sort-under-center.sortable.wikitable th.headerSort {
    padding-right: 0.2em;
  }
  body.skin-timeless .sort-under.sortable.wikitable th.headerSort,
  body.skin-timeless .sort-under-center.sortable.wikitable th.headerSort {
    padding-right: 0.5em;
  }

  /**
   * Reposition arrows.
   */
  html.client-js .sort-under.sortable th.headerSort {
    background-position: right bottom 0.2em;
  }
  html.client-js .sort-under-center.sortable th.headerSort {
    background-position: center bottom 0.2em;
  }

  /**
   * Add new space.
   */
  .sort-under.sortable th.headerSort,
  .sort-under.sortable th.unsortable,
  .sort-under-center.sortable th.headerSort,
  .sort-under-center.sortable th.unsortable {
    padding-bottom: 1em;
  }
  body.skin-timeless .sort-under.sortable.wikitable th.headerSort,
  body.skin-timeless .sort-under.sortable.wikitable th.unsortable,
  body.skin-timeless .sort-under-center.sortable.wikitable th.headerSort,
  body.skin-timeless .sort-under-center.sortable.wikitable th.unsortable {
    padding-bottom: 1.2em;
  }
  body.skin-timeless .sort-under.sortable:not(.wikitable) th.headerSort,
  body.skin-timeless .sort-under.sortable:not(.wikitable) th.unsortable,
  body.skin-timeless .sort-under-center.sortable:not(.wikitable) th.headerSort,
  body.skin-timeless .sort-under-center.sortable:not(.wikitable) th.unsortable,
  body.skin-minerva .sort-under.sortable:not(.wikitable) th.headerSort,
  body.skin-minerva .sort-under.sortable:not(.wikitable) th.unsortable,
  body.skin-minerva .sort-under-center.sortable:not(.wikitable) th.headerSort,
  body.skin-minerva .sort-under-center.sortable:not(.wikitable) th.unsortable {
    padding-bottom: 0.8em;
  }

  /**
   * Align {{static row numbers}} column header text.
   */
  .static-row-numbers.sort-under.sortable thead tr:only-child::before,
  .static-row-numbers.sort-under-center.sortable thead tr:only-child::before {
    padding-bottom: 0.9em;
  }
  body.skin-timeless .static-row-numbers.sort-under.sortable thead tr:only-child::before,
  body.skin-timeless .static-row-numbers.sort-under-center.sortable thead tr:only-child::before,
  body.skin-minerva .static-row-numbers.sort-under.sortable thead tr:only-child::before,
  body.skin-minerva .static-row-numbers.sort-under-center.sortable thead tr:only-child::before {
    padding-bottom: 0.8em;
  }

  /**
   * Adjust {{vertical header}} space.
   */
  .sort-under.sortable th.ts-vertical-header.headerSort,
  .sort-under-center.sortable th.ts-vertical-header.headerSort {
    padding-top: 0.4em;
    padding-right: 0.4em;
  }
}

/**
 * Increase touch screen button spacing for fat-finger error on header link.
 */
@media screen and (pointer: coarse) {
  /* Arrows. */
  html.client-js .sort-under.sortable.wikitable th.headerSort {
    background-position: right bottom 0.5em;
  }
  html.client-js .sort-under-center.sortable.wikitable th.headerSort {
    background-position: center bottom 0.5em;
  }
  /* Space. */
  .sort-under.sortable.wikitable th.headerSort,
  .sort-under.sortable.wikitable th.unsortable,
  .sort-under-center.sortable.wikitable th.headerSort,
  .sort-under-center.sortable.wikitable th.unsortable {
    padding-bottom: 1.6em;
  }
  body.skin-timeless .sort-under.sortable.wikitable th.headerSort,
  body.skin-timeless .sort-under.sortable.wikitable th.unsortable,
  body.skin-timeless .sort-under-center.sortable.wikitable th.headerSort,
  body.skin-timeless .sort-under-center.sortable.wikitable th.unsortable {
    padding-bottom: 1.8em;
  }
  /* {{Static row numbers}}. */
  .static-row-numbers.sort-under.sortable.wikitable thead tr:only-child::before,
  .static-row-numbers.sort-under-center.sortable.wikitable thead tr:only-child::before {
    padding-bottom: 1.5em;
  }
  body.skin-timeless .static-row-numbers.sort-under.sortable.wikitable thead tr:only-child::before,
  body.skin-timeless .static-row-numbers.sort-under-center.sortable.wikitable thead tr:only-child::before,
  body.skin-minerva .static-row-numbers.sort-under.sortable.wikitable thead tr:only-child::before,
  body.skin-minerva .static-row-numbers.sort-under-center.sortable.wikitable thead tr:only-child::before {
    padding-bottom: 1.4em;
  }
}

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.