Jump to content

MediaWiki:Common.css: Difference between revisions

Line 68: Line 68:
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb img { max-width: 100%; height: auto; }
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb img { max-width: 100%; height: auto; }
body.page-Special_ListFiles .mw-usertoollinks { white-space: normal !important; overflow-wrap: anywhere; }
body.page-Special_ListFiles .mw-usertoollinks { white-space: normal !important; overflow-wrap: anywhere; }
/* FIELDSET: allow shrinking, no scrollbars */
.continuum-body fieldset {
  min-width: 0;          /* crucial in flex layouts */
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: visible;  /* you said no scrolling */
}
/* LEGEND shouldn’t inflate width */
.continuum-body fieldset > legend {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* TABLE should fit container and wrap content */
.continuum-body fieldset table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;      /* enables predictable wrapping */
  border-collapse: collapse;
  box-sizing: border-box;
}
/* CELLS: wrap, don’t grow the table */
.continuum-body fieldset table th,
.continuum-body fieldset table td {
  min-width: 0;            /* lets fixed layout actually shrink */
  white-space: normal;      /* kill any nowraps */
  overflow-wrap: anywhere;  /* modern long-word wrap */
  word-break: break-word;  /* fallback for older browsers */
}
/* Usual offenders inside cells: links, codey bits, “nowrap” classes, user tools */
.continuum-body fieldset table a,
.continuum-body fieldset table code,
.continuum-body fieldset table .nowrap,
.continuum-body fieldset table .mw-usertoollinks,
.continuum-body fieldset table .mw-sha1,
.continuum-body fieldset table .mime-type {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Images/Thumbs must shrink with the cell */
.continuum-body fieldset table img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
/* If this is the ListFiles thumb column, keep it narrow (adjust nth-child if needed) */
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb,
body.page-Special_ListFiles .mw-datatable.listfiles th.TablePager_col_thumb {
  width: 120px;
}
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb img {
  max-width: 100%;
  height: auto;
}
/* Preformatted chunks (sometimes appear in tables) should wrap too */
.continuum-body fieldset table pre,
.continuum-body fieldset table .mw-code {
  white-space: pre-wrap;
  word-break: break-word;
}