Jump to content

MediaWiki:Common.css: Difference between revisions

Line 135: Line 135:
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; }
/* Scope everything to your content column */
.continuum-body fieldset {
  /* Let it actually shrink inside flex/grid parents */
  min-width: 0;                /* critical */
  max-width: 100%;
  box-sizing: border-box;
  /* Last-resort safety if inner content truly can't wrap */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Legends love to force width: keep them from doing that */
.continuum-body fieldset > legend {
  display: block;              /* avoid odd inline formatting context */
  max-width: 100%;
  white-space: normal;          /* undo any nowraps */
  overflow-wrap: anywhere;      /* long words/names wrap */
  word-break: break-word;      /* fallback */
}
/* Tables inside fieldset should respect the container */
.continuum-body fieldset table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;          /* predictable wrapping */
  border-collapse: collapse;
  box-sizing: border-box;
}
/* Cells: allow wrapping of long tokens */
.continuum-body fieldset table th,
.continuum-body fieldset table td {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Usual offenders inside cells */
.continuum-body fieldset table a,
.continuum-body fieldset table code,
.continuum-body fieldset table .nowrap {
  white-space: normal !important;
  overflow-wrap: anywhere;
}
/* Images shrink with the cell */
.continuum-body fieldset table img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}