Files
roi-theme/wp-content/themes/apus-theme/assets/css/css-global-toc.css
FrankZamora d52814c81d ARQUITECTURA: Completar renombramientos CSS - Carpetas 10-20 - Issue #133
RENOMBRAMIENTOS COMPLETADOS (19 archivos adicionales):

COMPONENTES (carpetas 10, 12, 14, 15, 17, 18, 19):
 post-content.css → componente-post-content.css (10)
 cta-box-sidebar.css → componente-cta-box-sidebar.css (12)
 cta.css → componente-cta-ab-testing.css (14)
 related-posts.css → componente-related-posts.css (15)
 header.css → componente-footer-principal.css (17)
 modal-contact.css → componente-modal-contacto.css (18)
 tables-apu.css → css-tablas-apu.css (19)

CSS GLOBALES (carpeta 20):
 variables.css → css-global-variables.css
 fonts.css → css-global-fonts.css
 utilities.css → css-global-utilities.css
 animations.css → css-global-animations.css
 responsive.css → css-global-responsive.css
 accessibility.css → css-global-accessibility.css
 print.css → css-global-print.css
 badges.css → css-global-badges.css
 pagination.css → css-global-pagination.css
 toc.css → css-global-toc.css
 generic-tables.css → css-global-generic-tables.css
 video.css → css-global-video.css

ACTUALIZACIONES:
- enqueue-scripts.php: Todas las referencias actualizadas (48 cambios)
- functions.php: Version bump 1.0.9 → 1.0.10

TOTAL RENOMBRAMIENTOS:
- Commit 8d876: 7 archivos (carpetas 05, 06, 07, 08, 11, 13, 16)
- Este commit: 19 archivos (carpetas 10, 12, 14, 15, 17, 18, 19 + globales 20)
- TOTAL: 26 archivos renombrados

CORRESPONDENCIA 1-A-1 COMPLETADA:
 Cada componente tiene su archivo CSS con nombre de carpeta
 Archivos globales con prefijo css-global-
 Sin duplicaciones
 Nomenclatura consistente

Issue: #133

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 17:27:08 -06:00

369 lines
7.6 KiB
CSS

/**
* Table of Contents Styles
*
* Styles for the automatic table of contents component.
* Includes responsive design and smooth animations.
*
* @package Apus_Theme
* @since 1.0.0
*/
/* ========================================
Table of Contents Container
======================================== */
.apus-toc {
background: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 12px; /* Template: 12px */
padding: 1.5rem;
margin: 2rem 0;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); /* Template shadow */
position: sticky;
top: 5.5rem;
z-index: 10;
transition: all 0.3s ease; /* Template: hover effect */
}
.apus-toc:hover {
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); /* Template hover shadow */
}
.apus-toc-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
padding-bottom: 0.75rem;
border-bottom: 3px solid #0d6efd; /* Template: 3px solid #0d6efd */
}
.apus-toc-title {
font-size: 1.25rem;
font-weight: 700; /* Template: 700 */
color: #2c3e50; /* Template color */
margin: 0;
line-height: 1.2;
text-align: center; /* Template: center */
flex: 1; /* Para que ocupe todo el espacio disponible */
font-style: normal; /* Template: normal */
}
/* ========================================
Toggle Button
======================================== */
.apus-toc-toggle {
background: none;
border: none;
padding: 0.5rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #6c757d;
transition: color 0.2s ease;
width: 32px;
height: 32px;
border-radius: 4px;
}
.apus-toc-toggle:hover {
color: #212529;
background-color: rgba(0, 0, 0, 0.05);
}
.apus-toc-toggle:focus {
outline: 2px solid #0d6efd;
outline-offset: 2px;
}
.toggle-icon {
width: 16px;
height: 16px;
position: relative;
display: block;
}
.toggle-icon::before,
.toggle-icon::after {
content: '';
position: absolute;
background-color: currentColor;
transition: transform 0.3s ease;
}
.toggle-icon::before {
width: 16px;
height: 2px;
top: 7px;
left: 0;
}
.toggle-icon::after {
width: 2px;
height: 16px;
top: 0;
left: 7px;
}
.apus-toc-toggle[aria-expanded="false"] .toggle-icon::after {
transform: rotate(90deg);
}
/* ========================================
Table of Contents List
======================================== */
.apus-toc-list {
list-style: none;
counter-reset: toc-counter;
margin: 0;
padding: 0;
max-height: 600px;
overflow-y: auto;
transition: max-height 0.3s ease, opacity 0.3s ease;
}
.apus-toc-toggle[aria-expanded="false"] + .apus-toc-list,
.apus-toc-toggle[aria-expanded="false"] ~ .apus-toc-list {
max-height: 0;
opacity: 0;
overflow: hidden;
}
.apus-toc-item {
position: relative;
margin-bottom: 0.5rem;
counter-increment: toc-counter;
}
.apus-toc-item:last-child {
margin-bottom: 0;
}
/* ========================================
Numbering System
======================================== */
/* H2 Level (Primary) */
.apus-toc-item.apus-toc-level-2::before {
content: counter(toc-counter) ". ";
font-weight: 600;
color: #495057;
margin-right: 0.5rem;
}
/* H3 Level (Secondary) - Nested */
.apus-toc-sublist {
list-style: none;
counter-reset: toc-subcounter;
margin: 0.5rem 0 0.5rem 1.5rem;
padding: 0;
}
.apus-toc-sublist .apus-toc-item {
counter-increment: toc-subcounter;
}
.apus-toc-sublist .apus-toc-item.apus-toc-level-3::before {
content: counter(toc-counter) "." counter(toc-subcounter) " ";
font-weight: 500;
color: #6c757d;
margin-right: 0.5rem;
}
/* ========================================
Links
======================================== */
.apus-toc-link {
color: #495057; /* Template color */
text-decoration: none;
display: block;
transition: all 0.3s ease; /* Template: all 0.3s ease */
line-height: 1.5;
position: relative;
padding: 0.375rem 1rem; /* Template: 0.375rem 1rem */
border-left: 3px solid transparent;
border-radius: 4px; /* Template: 4px */
font-size: 0.95rem; /* Template: 0.95rem */
}
.apus-toc-link:hover {
background: linear-gradient(90deg, rgba(13, 110, 253, 0.08), transparent); /* Template gradient */
border-left-color: #0d6efd;
color: #0d6efd;
padding-left: 1.5rem; /* Template: 1.5rem */
}
.apus-toc-link:focus {
outline: 2px solid #0d6efd;
outline-offset: 2px;
border-radius: 2px;
}
/* Active link highlighting - Template styles */
.apus-toc-link.active {
background: linear-gradient(90deg, rgba(13, 110, 253, 0.12), transparent); /* Template gradient */
border-left-color: #0d6efd;
color: #0d6efd;
font-weight: 600;
}
/* ========================================
Responsive Design
======================================== */
/* Tablets and smaller */
@media (max-width: 768px) {
.apus-toc {
padding: 1rem;
margin: 1.5rem 0;
}
.apus-toc-title {
font-size: 1.1rem;
}
.apus-toc-list {
max-height: 400px;
}
.apus-toc-sublist {
margin-left: 1rem;
}
}
/* Mobile */
@media (max-width: 480px) {
.apus-toc {
padding: 0.875rem;
margin: 1rem 0;
}
.apus-toc-title {
font-size: 1rem;
}
.apus-toc-link {
font-size: 0.9rem;
}
.apus-toc-list {
max-height: 300px;
font-size: 0.9rem;
}
.apus-toc-sublist {
margin-left: 0.75rem;
}
}
/* ========================================
Print Styles
======================================== */
@media print {
.apus-toc-toggle {
display: none;
}
.apus-toc-list {
max-height: none !important;
opacity: 1 !important;
}
.apus-toc-link {
color: #000;
}
.apus-toc {
box-shadow: none;
border: 1px solid #000;
page-break-inside: avoid;
}
}
/* ========================================
Accessibility
======================================== */
.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
}
.screen-reader-text:focus {
background-color: #f1f1f1;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
clip: auto !important;
clip-path: none;
color: #21759b;
display: block;
font-size: 0.875rem;
font-weight: 600;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000;
}
/* ========================================
Smooth Scroll Offset
======================================== */
/* Add scroll margin to headings to account for fixed headers */
h2[id],
h3[id] {
scroll-margin-top: 2rem;
}
@media (max-width: 768px) {
h2[id],
h3[id] {
scroll-margin-top: 1.5rem;
}
}
/* ========================================
Custom Scrollbar for TOC List
======================================== */
.apus-toc-list::-webkit-scrollbar {
width: 6px;
}
.apus-toc-list::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
.apus-toc-list::-webkit-scrollbar-thumb {
background: #cbd5e0;
border-radius: 3px;
}
.apus-toc-list::-webkit-scrollbar-thumb:hover {
background: #a0aec0;
}
/* Firefox */
.apus-toc-list {
scrollbar-width: thin;
scrollbar-color: #cbd5e0 #f1f1f1;
}