Array

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(44 intermediate revisions by the same user not shown)
Line 1: Line 1:
figure > a > img {
/* Responsive: Related articles - título arriba, contenido abajo */
width: 100% !important
@media only screen and (max-width: 768px), only screen and (max-device-width: 768px) {
}
 
/* Solución tipo table-responsive de Bootstrap - scroll solo en las tablas, no en el contenedor */
/* 1. Contenedor principal */
/* El contenedor padre NO tiene scroll, solo las tablas individuales */
    .site-header .wrap {
.mw-parser-output,
        display: flex;
.mw-content-text {
        flex-direction: column;
width: 100% !important;
        align-items: center;
max-width: 100% !important;
        padding: 30px 0 10px; /* Más espacio arriba para que respire el logo */
overflow-x: visible !important;
    }
}
 
    /* 2. Área del título/logo */
/* Las tablas tienen scroll horizontal individual - similar a .table-responsive de Bootstrap */
    .site-header .title-area {
/* Cada tabla es un contenedor con scroll independiente */
        width: 100%;
/* Usar flexbox para reordenar caption primero, pero mantener estructura para collapse */
        max-width: 100%; /* Elimina restricciones de ancho */
.mw-parser-output table.wikitable,
        text-align: center;
.mw-content-text table.wikitable,
        margin-bottom: 20px;
.mw-parser-output table,
    }
.mw-content-text table {
 
display: flex !important;
    /* 3. Forzar el tamaño de la imagen del logo */
flex-direction: column !important;
    .site-header .site-title a {
overflow-x: auto !important;
        display: inline-block;
overflow-y: hidden !important;
        width: 100%;
-webkit-overflow-scrolling: touch !important;
        min-height: 80px; /* Ajusta este valor según la altura real de tu logo */
width: 100% !important;
        background-size: contain !important; /* Asegura que el logo escale sin recortarse */
max-width: 100% !important;
        background-position: center !important;
table-layout: auto !important;
    }
margin: 1em 0 !important;
 
align-items: flex-start !important;
    /* Si el logo es una etiqueta <img> física en lugar de un background-image: */
}
    .site-header .title-area img {
        width: auto;
/* Caption debe aparecer primero usando order */
        max-width: 250px; /* Ajusta este número al tamaño que desees (ej. 300px) */
.mw-parser-output table.wikitable caption,
        height: auto;
.mw-content-text table.wikitable caption,
    }
.mw-parser-output table caption,
 
.mw-content-text table caption {
    /* 3. Ocultar o ajustar el texto azul (opcional) */
display: block !important;
    /* En la segunda imagen el texto azul no aparece o es muy discreto.  
text-align: left !important;
      Si quieres ocultarlo como en la imagen 2, usa: */
width: 100% !important;
    .site-header .header-widget-area {
order: -1 !important;
        display: none;  
margin-bottom: 0.5em !important;
    }
flex-shrink: 0 !important;
 
}
    /* 4. Estilo del botón para que coincida con la imagen 2 */
    .menu-toggle {
/* El tbody/thead mantiene la estructura de tabla con ancho fijo para activar scroll */
        width: 100%;
/* Mantener como table para que el JavaScript de collapse funcione */
        border: none;
/* Usar min-width para activar scroll horizontal en el contenedor flex */
        border-top: 1px solid #eeeeee;
.mw-parser-output table.wikitable tbody,
        background-color: #f9f9f9; /* Un gris muy ligero para diferenciarlo */
.mw-content-text table.wikitable tbody,
        color: #444;
.mw-parser-output table tbody,
        font-weight: bold;
.mw-content-text table tbody,
        padding: 15px 0;
.mw-parser-output table.wikitable thead,
        text-transform: none; /* Por si el tema lo pone en mayúsculas */
.mw-content-text table.wikitable thead,
    }
.mw-parser-output table thead,
.mw-content-text table thead {
display: table !important;
width: 100% !important;
min-width: 2000px !important;
order: 1 !important;
flex-shrink: 0 !important;
align-self: stretch !important;
}
/* Restaurar estructura de filas y celdas */
.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;
}
/* 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"],
.mw-content-text table[style*="width"] {
display: flex !important;
flex-direction: column !important;
overflow-x: auto !important;
overflow-y: hidden !important;
-webkit-overflow-scrolling: touch !important;
width: 100% !important;
max-width: 100% !important;
}
/* Las celdas tienen anchos razonables y permiten que el texto se ajuste normalmente */
/* Sin max-width excesivo para evitar celdas de 12000px */
.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;
}
/* Excluir tablas dentro de .related-articles-box - revertir estilos */
.related-articles-box table {
display: table !important;
overflow-x: visible !important;
overflow-y: visible !important;
width: auto !important;
min-width: auto !important;
max-width: 100% !important;
}
.related-articles-box table tbody,
.related-articles-box table thead {
display: table-row-group !important;
min-width: auto !important;
}
.related-articles-box table[style*="width"] {
display: table !important;
overflow-x: visible !important;
overflow-y: visible !important;
width: auto !important;
min-width: auto !important;
max-width: 100% !important;
}
.related-articles-box table th,
.related-articles-box table td {
width: auto !important;
max-width: 100% !important;
}
  }

Latest revision as of 15:00, 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) {
 	
	/* Solución tipo table-responsive de Bootstrap - scroll solo en las tablas, no en el contenedor */
	/* El contenedor padre NO tiene scroll, solo las tablas individuales */
	.mw-parser-output,
	.mw-content-text {
		width: 100% !important;
		max-width: 100% !important;
		overflow-x: visible !important;
	}
	
	/* Las tablas tienen scroll horizontal individual - similar a .table-responsive de Bootstrap */
	/* Cada tabla es un contenedor con scroll independiente */
	/* Usar flexbox para reordenar caption primero, pero mantener estructura para collapse */
	.mw-parser-output table.wikitable,
	.mw-content-text table.wikitable,
	.mw-parser-output table,
	.mw-content-text table {
		display: flex !important;
		flex-direction: column !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		-webkit-overflow-scrolling: touch !important;
		width: 100% !important;
		max-width: 100% !important;
		table-layout: auto !important;
		margin: 1em 0 !important;
		align-items: flex-start !important;
	}
	
	/* Caption debe aparecer primero usando order */
	.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;
		width: 100% !important;
		order: -1 !important;
		margin-bottom: 0.5em !important;
		flex-shrink: 0 !important;
	}
	
	/* El tbody/thead mantiene la estructura de tabla con ancho fijo para activar scroll */
	/* Mantener como table para que el JavaScript de collapse funcione */
	/* Usar min-width para activar scroll horizontal en el contenedor flex */
	.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: 2000px !important;
		order: 1 !important;
		flex-shrink: 0 !important;
		align-self: stretch !important;
	}
	
	/* Restaurar estructura de filas y celdas */
	.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;
	}
	
	/* 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"],
	.mw-content-text table[style*="width"] {
		display: flex !important;
		flex-direction: column !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		-webkit-overflow-scrolling: touch !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	/* Las celdas tienen anchos razonables y permiten que el texto se ajuste normalmente */
	/* Sin max-width excesivo para evitar celdas de 12000px */
	.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;
	}
	
	/* Excluir tablas dentro de .related-articles-box - revertir estilos */
	.related-articles-box table {
		display: table !important;
		overflow-x: visible !important;
		overflow-y: visible !important;
		width: auto !important;
		min-width: auto !important;
		max-width: 100% !important;
	}
	
	.related-articles-box table tbody,
	.related-articles-box table thead {
		display: table-row-group !important;
		min-width: auto !important;
	}
	
	.related-articles-box table[style*="width"] {
		display: table !important;
		overflow-x: visible !important;
		overflow-y: visible !important;
		width: auto !important;
		min-width: auto !important;
		max-width: 100% !important;
	}
	
	.related-articles-box table th,
	.related-articles-box table td {
		width: auto !important;
		max-width: 100% !important;
	}
	
  }