Array

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
Line 21: Line 21:
  }
  }
   
   
  /* Aplicar scroll directamente a las tablas */
  /* Mantener la tabla como display: table para preservar caption y headers */
  /* Convertir la tabla en un contenedor con scroll, pero mantener estructura interna */
  /* Aplicar scroll directamente a la tabla con ancho fijo interno */
  .mw-parser-output table.wikitable,
  .mw-parser-output table.wikitable,
  .mw-content-text table.wikitable,
  .mw-content-text table.wikitable,
  .mw-parser-output table:not([class]),
  .mw-parser-output table:not([class]),
  .mw-content-text table:not([class]) {
  .mw-content-text table:not([class]) {
  display: block !important;
  display: table !important;
  width: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  max-width: 100% !important;
Line 36: Line 36:
  }
  }
   
   
  /* Los elementos internos de la tabla (thead, tbody, tfoot) mantienen display: table y ancho fijo */
  /* El caption se mantiene visible */
  .mw-parser-output table.wikitable > caption,
  .mw-content-text table.wikitable > caption,
  .mw-parser-output table:not([class]) > caption,
  .mw-content-text table:not([class]) > caption {
  display: table-caption !important;
  font-weight: bold;
  width: 40%;
  text-align: left;
  caption-side: top !important;
  }
 
  /* El contenido interno (thead, tbody, tfoot) tiene ancho fijo para activar el scroll */
  .mw-parser-output table.wikitable > thead,
  .mw-parser-output table.wikitable > thead,
  .mw-content-text table.wikitable > thead,
  .mw-content-text table.wikitable > thead,
Line 49: Line 61:
  .mw-parser-output table:not([class]) > tfoot,
  .mw-parser-output table:not([class]) > tfoot,
  .mw-content-text table:not([class]) > tfoot {
  .mw-content-text table:not([class]) > tfoot {
  display: table !important;
  display: table-row-group !important;
  width: 2000px !important;
  width: 2000px !important;
  min-width: 2000px !important;
  min-width: 2000px !important;
Line 56: Line 68:
  }
  }
   
   
  /* Para tablas sin thead/tbody/tfoot explícitos, aplicar a las filas directas */
  /* Para tablas sin thead/tbody/tfoot explícitos, aplicar ancho fijo a las filas */
  .mw-parser-output table.wikitable > tr,
  .mw-parser-output table.wikitable > tr,
  .mw-content-text table.wikitable > tr,
  .mw-content-text table.wikitable > tr,
Line 63: Line 75:
  display: table-row !important;
  display: table-row !important;
  width: 2000px !important;
  width: 2000px !important;
  min-width: 2000px !important;
  max-width: 2000px !important;
  }
  }
   
   
Line 70: Line 84:
  .mw-parser-output table[style*="width"]:not([class]),
  .mw-parser-output table[style*="width"]:not([class]),
  .mw-content-text table[style*="width"]:not([class]) {
  .mw-content-text table[style*="width"]:not([class]) {
  display: block !important;
  display: table !important;
  width: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  max-width: 100% !important;
Line 97: Line 111:
  .mw-collapsible.mw-collapsed table,
  .mw-collapsible.mw-collapsed table,
  .mw-collapsible:not(.mw-collapsed) table {
  .mw-collapsible:not(.mw-collapsed) table {
  display: block !important;
  display: table !important;
  overflow-x: auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  -webkit-overflow-scrolling: touch !important;
Line 106: Line 120:
  width: 40%;
  width: 40%;
  text-align: left;
  text-align: left;
  display: table-caption !important;
   }
   }
   }
   }

Revision as of 13:52, 30 January 2026

/* Responsive: Related articles - título arriba, contenido abajo */
@media only screen and (max-width: 768px), only screen and (max-device-width: 768px) {
  
    .related-articles-box{
		word-break: keep-all;
	 }
	   
	   /* Solución: scroll horizontal solo dentro de la tabla, no en el contenedor */
	   /* Remover overflow-x de los contenedores principales y colapsables */
	   .mw-parser-output,
	   .mw-content-text {
		   overflow-x: visible !important;
	   }
	   
	   /* Remover scroll de contenedores colapsables para que no afecte el contenido fuera de la tabla */
	   .mw-parser-output .mw-collapsible-content,
	   .mw-content-text .mw-collapsible-content,
	   .mw-parser-output .collapsible-content,
	   .mw-content-text .collapsible-content {
		   overflow-x: visible !important;
	   }
	   
	   /* Mantener la tabla como display: table para preservar caption y headers */
	   /* Aplicar scroll directamente a la tabla con ancho fijo interno */
	   .mw-parser-output table.wikitable,
	   .mw-content-text table.wikitable,
	   .mw-parser-output table:not([class]),
	   .mw-content-text table:not([class]) {
		   display: table !important;
		   width: 100% !important;
		   max-width: 100% !important;
		   overflow-x: auto !important;
		   -webkit-overflow-scrolling: touch !important;
		   table-layout: auto !important;
		   margin: 1em 0 !important;
	   }
	   
	   /* El caption se mantiene visible */
	   .mw-parser-output table.wikitable > caption,
	   .mw-content-text table.wikitable > caption,
	   .mw-parser-output table:not([class]) > caption,
	   .mw-content-text table:not([class]) > caption {
		   display: table-caption !important;
		   font-weight: bold;
		   width: 40%;
		   text-align: left;
		   caption-side: top !important;
	   }
	   
	   /* El contenido interno (thead, tbody, tfoot) tiene ancho fijo para activar el scroll */
	   .mw-parser-output table.wikitable > thead,
	   .mw-content-text table.wikitable > thead,
	   .mw-parser-output table.wikitable > tbody,
	   .mw-content-text table.wikitable > tbody,
	   .mw-parser-output table.wikitable > tfoot,
	   .mw-content-text table.wikitable > tfoot,
	   .mw-parser-output table:not([class]) > thead,
	   .mw-content-text table:not([class]) > thead,
	   .mw-parser-output table:not([class]) > tbody,
	   .mw-content-text table:not([class]) > tbody,
	   .mw-parser-output table:not([class]) > tfoot,
	   .mw-content-text table:not([class]) > tfoot {
		   display: table-row-group !important;
		   width: 2000px !important;
		   min-width: 2000px !important;
		   max-width: 2000px !important;
		   table-layout: auto !important;
	   }
	   
	   /* Para tablas sin thead/tbody/tfoot explícitos, aplicar ancho fijo a las filas */
	   .mw-parser-output table.wikitable > tr,
	   .mw-content-text table.wikitable > tr,
	   .mw-parser-output table:not([class]) > tr,
	   .mw-content-text table:not([class]) > tr {
		   display: table-row !important;
		   width: 2000px !important;
		   min-width: 2000px !important;
		   max-width: 2000px !important;
	   }
	   
	   /* Sobrescribir estilos inline de width en las tablas */
	   .mw-parser-output table.wikitable[style*="width"],
	   .mw-content-text table.wikitable[style*="width"],
	   .mw-parser-output table[style*="width"]:not([class]),
	   .mw-content-text table[style*="width"]:not([class]) {
		   display: table !important;
		   width: 100% !important;
		   max-width: 100% !important;
		   overflow-x: auto !important;
		   -webkit-overflow-scrolling: touch !important;
	   }
	   
	   /* Las celdas tienen anchos razonables y permiten que el texto se ajuste normalmente */
	   .mw-parser-output table.wikitable th,
	   .mw-content-text table.wikitable th,
	   .mw-parser-output table.wikitable td,
	   .mw-content-text table.wikitable td,
	   .mw-parser-output table th,
	   .mw-content-text table th,
	   .mw-parser-output table td,
	   .mw-content-text table td {
		   white-space: normal !important;
		   word-wrap: break-word !important;
		   overflow-wrap: break-word !important;
		   width: revert-layer !important;
		   max-width: 100% !important;
		   display: table-cell !important;
	   }
	   
	   /* Asegurar que el collapse/expand no se vea afectado */
	   .mw-collapsible.mw-collapsed table,
	   .mw-collapsible:not(.mw-collapsed) table {
		   display: table !important;
		   overflow-x: auto !important;
		   -webkit-overflow-scrolling: touch !important;
	   }
	   
   table.wikitable > caption {
	   font-weight: bold;
	   width: 40%;
	   text-align: left;
   }
	
  }