From aea88f873807019d438340703b0a8d4b02f3bd9a Mon Sep 17 00:00:00 2001 From: FrankZamora Date: Fri, 7 Nov 2025 14:15:30 -0600 Subject: [PATCH] [LIMPIEZA] Eliminar theme.css completamente - Issue #125 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Análisis Completo - Procesadas 17 carpetas (03-19) con ALGORITMO.md - Resultado: 0 líneas CSS documentadas para theme.css - 100% del CSS documentado va en style.css ## Cambios Realizados 1. ELIMINADO: wp-content/themes/apus-theme/assets/css/theme.css (638 líneas) 2. COMENTADO: Enqueue de theme.css en inc/enqueue-scripts.php 3. ACTUALIZADAS: Dependencias animations/responsive/utilities → apus-bootstrap ## Impacto - Antes: 638 líneas de código basura + 53+ sobrescrituras Bootstrap - Después: 0 líneas - tema limpio sin conflictos - Resuelve: Issue #125 - Previene: Futuros bugs como Issue #124 Ver reportes: _planeacion/_desarrollo-tema-apus/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../themes/apus-theme/assets/css/theme.css | 638 ------------------ .../themes/apus-theme/inc/enqueue-scripts.php | 27 +- 2 files changed, 16 insertions(+), 649 deletions(-) delete mode 100644 wp-content/themes/apus-theme/assets/css/theme.css diff --git a/wp-content/themes/apus-theme/assets/css/theme.css b/wp-content/themes/apus-theme/assets/css/theme.css deleted file mode 100644 index 93c42fcf..00000000 --- a/wp-content/themes/apus-theme/assets/css/theme.css +++ /dev/null @@ -1,638 +0,0 @@ -/** - * Theme Styles - * - * Main theme styles, colors, and custom components - * @package Apus_Theme - * @since 1.0.0 - */ - -:root { - /* Primary Colors */ - --primary-color: #0d6efd; - --secondary-color: #6c757d; - --success-color: #198754; - --danger-color: #dc3545; - --warning-color: #ffc107; - --info-color: #0dcaf0; - --light-color: #f8f9fa; - --dark-color: #212529; - - /* Brand Colors */ - --brand-primary: #0d6efd; - --brand-secondary: #6c757d; - - /* Neutral Colors */ - --white: #ffffff; - --black: #000000; - --gray-100: #f8f9fa; - --gray-200: #e9ecef; - --gray-300: #dee2e6; - --gray-400: #ced4da; - --gray-500: #adb5bd; - --gray-600: #6c757d; - --gray-700: #495057; - --gray-800: #343a40; - --gray-900: #212529; - - /* Spacing */ - --spacing-xs: 0.25rem; - --spacing-sm: 0.5rem; - --spacing-md: 1rem; - --spacing-lg: 1.5rem; - --spacing-xl: 2rem; - --spacing-2xl: 3rem; - --spacing-3xl: 4rem; - - /* Font family */ - --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - --font-family-serif: Georgia, "Times New Roman", serif; - - /* Font sizes */ - --font-size-base: 16px; - --font-size-sm: 14px; - --font-size-lg: 18px; - --font-size-xl: 20px; - --font-size-2xl: 24px; - --font-size-3xl: 32px; - - /* Line height */ - --line-height-base: 1.5; - --line-height-sm: 1.25; - --line-height-lg: 1.75; - - /* Border radius */ - --border-radius: 0.25rem; - --border-radius-sm: 0.125rem; - --border-radius-lg: 0.5rem; - - /* Box shadow */ - --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); - --box-shadow-sm: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.075); - --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175); - - /* Transition */ - --transition-base: all 0.3s ease-in-out; - --transition-fade: opacity 0.15s linear; - --transition-collapse: height 0.35s ease; - - /* Z-index */ - --z-dropdown: 1000; - --z-sticky: 1020; - --z-fixed: 1030; - --z-modal-backdrop: 1040; - --z-modal: 1050; - --z-popover: 1060; - --z-tooltip: 1070; -} - -/* Global styles */ -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -*::before, -*::after { - box-sizing: border-box; -} - -html { - font-size: 16px; - scroll-behavior: smooth; -} - -body { - font-family: var(--font-family-base); - font-size: var(--font-size-base); - line-height: var(--line-height-base); - color: var(--gray-900); - background-color: var(--white); - transition: var(--transition-base); -} - -/* Typography */ -h1, -h2, -h3, -h4, -h5, -h6 { - margin-bottom: var(--spacing-md); - font-weight: 700; - line-height: 1.2; - color: var(--gray-900); -} - -h1 { - font-size: var(--font-size-3xl); -} - -h2 { - font-size: var(--font-size-2xl); -} - -h3 { - font-size: var(--font-size-xl); -} - -h4 { - font-size: var(--font-size-lg); -} - -h5 { - font-size: var(--font-size-base); -} - -h6 { - font-size: var(--font-size-sm); -} - -p { - margin-bottom: var(--spacing-md); -} - -a { - color: var(--primary-color); - text-decoration: none; - transition: var(--transition-base); -} - -a:hover { - color: #0b5ed7; - text-decoration: underline; -} - -a:focus { - outline: 2px solid var(--primary-color); - outline-offset: 2px; -} - -/* Lists */ -ul, -ol { - margin-bottom: var(--spacing-md); - padding-left: 2rem; -} - -ul ul, -ul ol, -ol ul, -ol ol { - margin-bottom: 0; -} - -li { - margin-bottom: 0.25rem; -} - -/* Code */ -code, -pre { - font-family: var(--font-family-monospace); - color: var(--gray-900); - background-color: var(--gray-100); - border-radius: var(--border-radius-lg); -} - -code { - padding: 0.25rem 0.5rem; - font-size: 0.875em; -} - -pre { - padding: var(--spacing-md); - margin-bottom: var(--spacing-md); - overflow-x: auto; -} - -pre code { - padding: 0; - font-size: inherit; - background-color: transparent; -} - -/* Blockquote */ -blockquote { - margin-bottom: var(--spacing-md); - padding-left: var(--spacing-md); - border-left: 4px solid var(--gray-300); - color: var(--gray-700); -} - -blockquote p:last-child { - margin-bottom: 0; -} - -/* Images */ -img { - max-width: 100%; - height: auto; - display: block; -} - -figure { - margin-bottom: var(--spacing-md); -} - -figcaption { - font-size: var(--font-size-sm); - color: var(--gray-600); - margin-top: 0.5rem; -} - -/* Tables */ -table { - width: 100%; - margin-bottom: var(--spacing-md); - border-collapse: collapse; - background-color: transparent; -} - -table th, -table td { - padding: 0.75rem; - border-bottom: 1px solid var(--gray-300); - text-align: left; - vertical-align: top; -} - -table thead th { - background-color: var(--gray-100); - font-weight: 700; - border-bottom: 2px solid var(--gray-300); -} - -table tbody tr:hover { - background-color: var(--gray-50); -} - -table tbody tr:nth-child(even) { - background-color: var(--gray-50); -} - -/* Forms */ -.form-group { - margin-bottom: var(--spacing-md); -} - -label { - display: inline-block; - margin-bottom: 0.5rem; - font-weight: 500; -} - -input, -textarea, -select, -.form-control { - width: 100%; - padding: 0.5rem 0.75rem; - font-family: inherit; - font-size: inherit; - line-height: var(--line-height-base); - color: var(--gray-900); - background-color: var(--white); - border: 1px solid var(--gray-300); - border-radius: var(--border-radius-lg); - transition: var(--transition-base); -} - -input:focus, -textarea:focus, -select:focus, -.form-control:focus { - outline: none; - border-color: var(--primary-color); - box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25); -} - -textarea { - min-height: 120px; - resize: vertical; -} - -/* Buttons - * ELIMINADO: Estas reglas globales sobrescriben Bootstrap btn-outline - * Bootstrap maneja los estilos de botones correctamente - * Solo mantener estilos para inputs que NO usan clases Bootstrap - */ -input[type="button"]:not([class*="btn"]), -input[type="submit"]:not([class*="btn"]), -input[type="reset"]:not([class*="btn"]) { - display: inline-block; - padding: 0.5rem 1rem; - font-family: inherit; - font-size: var(--font-size-base); - font-weight: 500; - line-height: var(--line-height-base); - text-align: center; - white-space: nowrap; - vertical-align: middle; - cursor: pointer; - user-select: none; - border: 1px solid transparent; - border-radius: var(--border-radius-lg); - background-color: var(--primary-color); - color: var(--white); - text-decoration: none; - transition: var(--transition-base); -} - -input[type="button"]:not([class*="btn"]):hover, -input[type="submit"]:not([class*="btn"]):hover, -input[type="reset"]:not([class*="btn"]):hover { - background-color: #0b5ed7; - text-decoration: none; -} - -input[type="button"]:not([class*="btn"]):focus, -input[type="submit"]:not([class*="btn"]):focus, -input[type="reset"]:not([class*="btn"]):focus { - outline: none; - box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.5); -} - -input[type="button"]:not([class*="btn"]):disabled, -input[type="submit"]:not([class*="btn"]):disabled, -input[type="reset"]:not([class*="btn"]):disabled { - opacity: 0.65; - cursor: not-allowed; -} - -/* Button variants - * ELIMINADO: Bootstrap ya define todas estas clases - * .btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark - * .btn-outline-primary, .btn-outline-secondary, etc. - * .btn-sm, .btn-lg - * - * No sobrescribir Bootstrap - dejarlo manejar los estilos de botones - */ - -/* Alerts */ -.alert { - padding: var(--spacing-md); - margin-bottom: var(--spacing-md); - border: 1px solid transparent; - border-radius: var(--border-radius-lg); -} - -.alert-primary { - background-color: #cfe2ff; - border-color: #b6d4fe; - color: #084298; -} - -.alert-secondary { - background-color: #e2e3e5; - border-color: #d3d6d8; - color: #41464b; -} - -.alert-success { - background-color: #d1e7dd; - border-color: #badbcc; - color: #0f5132; -} - -.alert-danger { - background-color: #f8d7da; - border-color: #f5c2c7; - color: #842029; -} - -.alert-warning { - background-color: #fff3cd; - border-color: #ffecb5; - color: #664d03; -} - -.alert-info { - background-color: #d1ecf1; - border-color: #bee5eb; - color: #0c5460; -} - -/* Cards */ -.card { - display: flex; - flex-direction: column; - background-color: var(--white); - border: 1px solid var(--gray-300); - border-radius: var(--border-radius-lg); - overflow: hidden; - box-shadow: var(--box-shadow); - transition: var(--transition-base); -} - -.card:hover { - box-shadow: var(--box-shadow-lg); -} - -.card-header { - padding: var(--spacing-md); - background-color: var(--gray-100); - border-bottom: 1px solid var(--gray-300); - font-weight: 600; -} - -.card-body { - padding: var(--spacing-md); - flex: 1; -} - -.card-footer { - padding: var(--spacing-md); - background-color: var(--gray-100); - border-top: 1px solid var(--gray-300); -} - -.card-title { - margin-bottom: 0.5rem; - font-size: var(--font-size-lg); - font-weight: 600; -} - -.card-text { - margin-bottom: 0; - color: var(--gray-700); -} - -/* Badges */ -.badge { - display: inline-block; - padding: 0.25rem 0.5rem; - font-size: 0.75rem; - font-weight: 600; - line-height: 1; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: var(--border-radius); - background-color: var(--primary-color); - color: var(--white); -} - -.badge-secondary { - background-color: var(--secondary-color); -} - -.badge-success { - background-color: var(--success-color); -} - -.badge-danger { - background-color: var(--danger-color); -} - -.badge-warning { - background-color: var(--warning-color); - color: var(--gray-900); -} - -.badge-info { - background-color: var(--info-color); -} - -.badge-light { - background-color: var(--light-color); - color: var(--gray-900); -} - -.badge-dark { - background-color: var(--dark-color); -} - -/* Helpers */ -.text-primary { - color: var(--primary-color) !important; -} - -.text-secondary { - color: var(--secondary-color) !important; -} - -.text-success { - color: var(--success-color) !important; -} - -.text-danger { - color: var(--danger-color) !important; -} - -.text-warning { - color: var(--warning-color) !important; -} - -.text-info { - color: var(--info-color) !important; -} - -.text-light { - color: var(--light-color) !important; -} - -.text-dark { - color: var(--dark-color) !important; -} - -.text-muted { - color: var(--gray-600) !important; -} - -.bg-primary { - background-color: var(--primary-color) !important; -} - -.bg-secondary { - background-color: var(--secondary-color) !important; -} - -.bg-success { - background-color: var(--success-color) !important; -} - -.bg-danger { - background-color: var(--danger-color) !important; -} - -.bg-warning { - background-color: var(--warning-color) !important; -} - -.bg-info { - background-color: var(--info-color) !important; -} - -.bg-light { - background-color: var(--light-color) !important; -} - -.bg-dark { - background-color: var(--dark-color) !important; -} - -.bg-white { - background-color: var(--white) !important; -} - -/* Margin and Padding */ -.m-0 { - margin: 0 !important; -} - -.mt-0 { - margin-top: 0 !important; -} - -.mb-0 { - margin-bottom: 0 !important; -} - -.ml-0 { - margin-left: 0 !important; -} - -.mr-0 { - margin-right: 0 !important; -} - -.p-0 { - padding: 0 !important; -} - -.pt-0 { - padding-top: 0 !important; -} - -.pb-0 { - padding-bottom: 0 !important; -} - -.pl-0 { - padding-left: 0 !important; -} - -.pr-0 { - padding-right: 0 !important; -} - -/* Dividers */ -hr { - border: 0; - border-top: 1px solid var(--gray-300); - margin: var(--spacing-lg) 0; -} - -/* Focus visible */ -:focus-visible { - outline: 2px solid var(--primary-color); - outline-offset: 2px; -} - -/* Selection */ -::selection { - background-color: var(--primary-color); - color: var(--white); -} diff --git a/wp-content/themes/apus-theme/inc/enqueue-scripts.php b/wp-content/themes/apus-theme/inc/enqueue-scripts.php index cc2264d1..e6d88efc 100644 --- a/wp-content/themes/apus-theme/inc/enqueue-scripts.php +++ b/wp-content/themes/apus-theme/inc/enqueue-scripts.php @@ -339,22 +339,27 @@ add_action('wp_enqueue_scripts', 'apus_enqueue_toc_assets', 10); /** * Enqueue theme core styles + * + * ELIMINADO: theme.css (Issue #125) + * Motivo: theme.css contenía código experimental y sobrescrituras Bootstrap no documentadas + * Resultado: 638 líneas eliminadas - TODO el CSS documentado va en style.css + * Fecha: 2025-01-07 */ function apus_enqueue_theme_styles() { - // Theme Core Styles - wp_enqueue_style( - 'apus-theme', - get_template_directory_uri() . '/assets/css/theme.css', - array('apus-bootstrap'), - '1.0.0', - 'all' - ); + // Theme Core Styles - ELIMINADO theme.css + // wp_enqueue_style( + // 'apus-theme', + // get_template_directory_uri() . '/assets/css/theme.css', + // array('apus-bootstrap'), + // '1.0.0', + // 'all' + // ); // Theme Animations wp_enqueue_style( 'apus-animations', get_template_directory_uri() . '/assets/css/animations.css', - array('apus-theme'), + array('apus-bootstrap'), // Cambiado de 'apus-theme' a 'apus-bootstrap' '1.0.0', 'all' ); @@ -363,7 +368,7 @@ function apus_enqueue_theme_styles() { wp_enqueue_style( 'apus-responsive', get_template_directory_uri() . '/assets/css/responsive.css', - array('apus-theme'), + array('apus-bootstrap'), // Cambiado de 'apus-theme' a 'apus-bootstrap' '1.0.0', 'all' ); @@ -372,7 +377,7 @@ function apus_enqueue_theme_styles() { wp_enqueue_style( 'apus-utilities', get_template_directory_uri() . '/assets/css/utilities.css', - array('apus-theme'), + array('apus-bootstrap'), // Cambiado de 'apus-theme' a 'apus-bootstrap' '1.0.0', 'all' );