Array

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
Line 4: Line 4:
     word-break: keep-all;
     word-break: keep-all;
   }
   }
/* Tablas con scroll horizontal en móviles - solución basada en MobileFrontend */
/* Solución tipo table-responsive de Bootstrap - contenedor con scroll horizontal */
/* Forzar scroll horizontal en las tablas - sobrescribir estilos inline */
/* El contenedor padre actúa como wrapper con scroll, similar a .table-responsive */
.mw-parser-output table.wikitable,
.mw-parser-output,
.mw-content-text table.wikitable,
.mw-content-text {
.mw-parser-output table,
.mw-content-text table {
display: block !important;
display: block !important;
overflow-x: auto !important;
overflow-x: auto !important;
overflow-y: hidden !important;
-webkit-overflow-scrolling: touch !important;
-webkit-overflow-scrolling: touch !important;
width: 100% !important;
width: 100% !important;
max-width: 100% !important;
max-width: 100% !important;
}
/* Las tablas mantienen su estructura normal pero con ancho mínimo para activar scroll */
/* Similar a como Bootstrap hace: la tabla tiene width: 100% pero el contenedor tiene scroll */
.mw-parser-output table.wikitable,
.mw-content-text table.wikitable,
.mw-parser-output table,
.mw-content-text table {
width: max-content !important;
min-width: 100% !important;
table-layout: auto !important;
margin: 1em 0 !important;
margin: 1em 0 !important;
}
}
/* Sobrescribir estilos inline de width en las tablas */
/* Sobrescribir estilos inline de width */
.mw-parser-output table.wikitable[style*="width"],
.mw-parser-output table.wikitable[style*="width"],
.mw-content-text table.wikitable[style*="width"],
.mw-content-text table.wikitable[style*="width"],
.mw-parser-output table[style*="width"],
.mw-parser-output table[style*="width"],
.mw-content-text table[style*="width"] {
.mw-content-text table[style*="width"] {
width: 100% !important;
width: max-content !important;
max-width: 100% !important;
min-width: 100% !important;
}
/* Restaurar estructura de tabla en elementos internos con ancho mínimo para activar scroll */
.mw-parser-output table.wikitable tbody,
.mw-content-text table.wikitable tbody,
.mw-parser-output table tbody,
.mw-content-text table tbody,
.mw-parser-output table.wikitable thead,
.mw-content-text table.wikitable thead,
.mw-parser-output table thead,
.mw-content-text table thead {
display: table !important;
width: 100% !important;
min-width: 800px !important;
table-layout: auto !important;
}
.mw-parser-output table.wikitable tr,
.mw-content-text table.wikitable tr,
.mw-parser-output table tr,
.mw-content-text table tr {
display: table-row !important;
}
}
/* Las celdas mantienen su ancho natural sin comprimirse */
.mw-parser-output table.wikitable th,
.mw-parser-output table.wikitable th,
.mw-content-text table.wikitable th,
.mw-content-text table.wikitable th,
Line 58: Line 45:
.mw-parser-output table td,
.mw-parser-output table td,
.mw-content-text table td {
.mw-content-text table td {
display: table-cell !important;
white-space: normal !important;
white-space: normal !important;
word-wrap: break-word !important;
word-wrap: break-word !important;
padding: 0.2em 0.5em !important;
min-width: 100px !important;
}
}
/* Columnas específicas con ancho mínimo más grande para contenido largo */
.mw-parser-output table.wikitable th:nth-child(3),
.mw-content-text table.wikitable th:nth-child(3),
.mw-parser-output table.wikitable td:nth-child(3),
.mw-content-text table.wikitable td:nth-child(3),
.mw-parser-output table.wikitable th:nth-child(4),
.mw-content-text table.wikitable th:nth-child(4),
.mw-parser-output table.wikitable td:nth-child(4),
.mw-content-text table.wikitable td:nth-child(4) {
min-width: 200px !important;
}
/* Caption también debe ser block */
.mw-parser-output table.wikitable caption,
.mw-content-text table.wikitable caption,
.mw-parser-output table caption,
.mw-content-text table caption {
display: block !important;
text-align: left !important;
}
}
}

Revision as of 13:46, 29 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 tipo table-responsive de Bootstrap - contenedor con scroll horizontal */
	/* El contenedor padre actúa como wrapper con scroll, similar a .table-responsive */
	.mw-parser-output,
	.mw-content-text {
		display: block !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	/* Las tablas mantienen su estructura normal pero con ancho mínimo para activar scroll */
	/* Similar a como Bootstrap hace: la tabla tiene width: 100% pero el contenedor tiene scroll */
	.mw-parser-output table.wikitable,
	.mw-content-text table.wikitable,
	.mw-parser-output table,
	.mw-content-text table {
		width: max-content !important;
		min-width: 100% !important;
		table-layout: auto !important;
		margin: 1em 0 !important;
	}
	
	/* Sobrescribir estilos inline de width */
	.mw-parser-output table.wikitable[style*="width"],
	.mw-content-text table.wikitable[style*="width"],
	.mw-parser-output table[style*="width"],
	.mw-content-text table[style*="width"] {
		width: max-content !important;
		min-width: 100% !important;
	}
	
	/* Las celdas mantienen su ancho natural sin comprimirse */
	.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;
	}
	
	
}