Jump to content

MediaWiki:Common.css: Difference between revisions

Line 21: Line 21:
   display: inline-block;          /* makes wrapping cleaner inside cells */
   display: inline-block;          /* makes wrapping cleaner inside cells */
}
}
/* 1) Let the content column actually shrink (flexbox gotcha) */
.continuum-body { overflow-x: auto; min-width: 0;}
.continuum-body { min-width: 0; }
 
/* 2) Any table in the content should respect the container */
.continuum-body table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  box-sizing: border-box;
}
 
/* 3) Cells: allow wrapping of long stuff */
.continuum-body table th,
.continuum-body table td {
  min-width: 0;            /* crucial with table-layout:fixed */
  white-space: normal;    /* kill any stray nowraps */
  overflow-wrap: anywhere; /* modern break for long tokens */
  word-break: break-word;  /* fallback */
}
 
/* 4) Common offenders inside cells */
.continuum-body table a,
.continuum-body table code,
.continuum-body table .nowrap,
.continuum-body table .mw-usertoollinks,
.continuum-body table .mw-parser-output .nowrap {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
 
/* 5) Images/thumbs shrink with the cell */
.continuum-body table img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
 
/* 6) Safety: horizontally scroll if something truly can’t shrink (e.g., embedded iframes) */
.continuum-body { overflow-x: auto; }


/* 7) Special:ListFiles specifics you already touched, but keep them here for consistency */
/* 7) Special:ListFiles specifics you already touched, but keep them here for consistency */
Line 122: Line 82:
}
}


/* If this is the ListFiles thumb column, keep it narrow (adjust nth-child if needed) */
/* ===== Special:Upload (and its stash step) ===== */
body.page-Special_Upload .continuum-body,
body.page-Special_UploadStash .continuum-body {
  min-width: 0;
  max-width: 100%;
}
 
/* Fieldsets & forms on Upload */
body.page-Special_Upload .continuum-body fieldset,
body.page-Special_UploadStash .continuum-body fieldset {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible; /* no scrollbars, make it fit */
}
 
body.page-Special_Upload .continuum-body fieldset > legend,
body.page-Special_UploadStash .continuum-body fieldset > legend {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0 0 .25em 0;
}
 
/* Tables/forms inside Upload */
body.page-Special_Upload .continuum-body table,
body.page-Special_UploadStash .continuum-body table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  box-sizing: border-box;
}
body.page-Special_Upload .continuum-body th,
body.page-Special_Upload .continuum-body td,
body.page-Special_UploadStash .continuum-body th,
body.page-Special_UploadStash .continuum-body td {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.page-Special_Upload .continuum-body img,
body.page-Special_UploadStash .continuum-body img {
  max-width: 100%;
  height: auto;
  display: block;
}
 
/* ===== Special:ListFiles ===== */
body.page-Special_ListFiles .continuum-body { min-width: 0; max-width: 100%; }
 
body.page-Special_ListFiles .mw-datatable.listfiles {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
body.page-Special_ListFiles .mw-datatable.listfiles th,
body.page-Special_ListFiles .mw-datatable.listfiles td {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
 
/* Thumbnails column stays narrow; images shrink to fit */
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb,
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb,
body.page-Special_ListFiles .mw-datatable.listfiles th.TablePager_col_thumb {
body.page-Special_ListFiles .mw-datatable.listfiles th.TablePager_col_thumb { width: 120px; }
  width: 120px;
}
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb img {
body.page-Special_ListFiles .mw-datatable.listfiles td.TablePager_col_thumb img {
   max-width: 100%;
   max-width: 100%;
   height: auto;
   height: auto;
  object-fit: contain;
  display: block;
}
/* Usual overflow goblins on ListFiles only */
body.page-Special_ListFiles .mw-usertoollinks,
body.page-Special_ListFiles .mw-datatable.listfiles .mw-sha1,
body.page-Special_ListFiles .mw-datatable.listfiles .mime-type,
body.page-Special_ListFiles .mw-datatable.listfiles .nowrap,
body.page-Special_ListFiles .mw-datatable.listfiles a,
body.page-Special_ListFiles .mw-datatable.listfiles code {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
}


/* Preformatted chunks (sometimes appear in tables) should wrap too */
/* Preformatted chunks (sometimes appear in tables) should wrap too */
Line 227: Line 268:
.continuum-body fieldset .oo-ui-widget {
.continuum-body fieldset .oo-ui-widget {
   max-width: 100%;
   max-width: 100%;
}
/* Special:ListFiles niceties (if the table is inside this fieldset) */
body.page-Special_ListFiles .mw-datatable.listfiles { table-layout: fixed; }
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; object-fit: contain; display: block;
}
body.page-Special_RecentChanges .mw-changeslist-line-inner {
  min-width: 0;
  max-width: 200px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;      /* fallback for old browsers */
  box-sizing: border-box;      /* widths behave predictably */
}
}