/
githubmirror
/
marked
Обзор
Документация
Войти
/
githubmirror
/
marked
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/css/style.css
234 строки
5 KB
Tony Brix
docs: move theme button to menu (#4043)
05 авг 2026, 01:38
Не верифицирован
05 авг 2026, 01:38
2e21cd3
Код
Авторство
О чём код?
/* This file contains custom styles and CSS variables that supplement Tailwind CSS. */ /* Define color scheme variables based on the Tailwind config */ @layer utilities { .scroll-hidden { overflow-y: auto; -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ } .scroll-hidden::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera */ } } /* Improved section spacing */ .prose h2 { margin-top: 3rem; margin-bottom: 1.5rem; } .prose h3 { margin-top: 2.5rem; margin-bottom: 1.25rem; } .prose p { margin-bottom: 1.25rem; line-height: 1.75; } .prose ul, .prose ol { margin-top: 1.25rem; margin-bottom: 1.25rem; } .prose pre { margin-top: 1.5rem; margin-bottom: 1.5rem; } :root { --primary-color: #3B82F6; --background-color: #FFFFFF; --text-color: #1F2937; --subtle-text-color: #6B7280; --border-color: #E5E7EB; --code-bg-color: #F3F4F6; } .dark { --background-color: #111827; --text-color: #F9FAFB; --subtle-text-color: #9CA3AF; --border-color: #374151; --code-bg-color: #1F2937; } /* Custom styles for the warning box */ .alert-warning { background-color: #FEF2F2; border-left: 4px solid #EF4444; color: #B91C1C; padding: 1rem; border-radius: 0 0.5rem 0.5rem 0; margin: 1.5rem 0; } .dark .alert-warning { background-color: #2c1d1d; border-left-color: #F87171; color: #FCA5A5; } .alert-warning a { text-decoration: underline; font-weight: 500; } /* --- Add this to the end of docs/css/style.css --- */ /* --- Add this to the end of docs/css/style.css --- */ /* This sets the background color for all code blocks and lets height be dynamic. */ pre { height: auto; align-items: center; } .prose pre { background-color: #D1D5DB; /* Your light mode bg-gray-300 */ color:black; } .dark .prose pre { background-color: #1F2937; /* Your dark mode dark:bg-gray-800 */ color: white; } /* This fixes a conflict where the <code> tag itself has a background, hiding the <pre> background. */ .prose pre code.hljs { background-color: transparent !important; } /* ============================================ MOBILE RESPONSIVE STYLES ============================================ */ /* Mobile Menu Toggle Button */ .mobile-menu-toggle { display: none; /* Hidden on desktop by default */ position: fixed; top: 16px; left: 16px; z-index: 9998; width: 48px; height: 48px; border: none; border-radius: 8px; background-color: var(--background-color); color: var(--text-color); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; align-items: center; justify-content: center; } .mobile-menu-toggle:hover { background-color: var(--code-bg-color); transform: scale(1.05); } .mobile-menu-toggle:active { transform: scale(0.95); } .dark .mobile-menu-toggle { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } /* Mobile Overlay */ .mobile-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 39; opacity: 0; transition: opacity 0.3s ease; } .mobile-overlay.active { opacity: 1; } /* Mobile Styles - Changed breakpoint from 768px to 1024px */ @media (max-width: 1024px) { /* Show mobile menu button */ .mobile-menu-toggle { display: flex; } /* Hide sidebar by default on mobile */ .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; } /* Show sidebar when menu is open */ .sidebar.mobile-open { transform: translateX(0); } /* Show overlay when menu is open */ .mobile-overlay.active { display: block; } /* Adjust main content for mobile */ .main-content { margin-left: 0 !important; padding: 80px 20px 20px 20px !important; width: 100%; } /* Make sidebar full height on mobile */ .sidebar { width: 280px; max-width: 85vw; } /* Adjust heading sizes for mobile */ .main-content h1 { font-size: 2rem !important; } /* Adjust prose max-width for mobile */ .prose { max-width: 100% !important; } /* Make tables scrollable on mobile */ .prose table:not(.hidden) { display: block; overflow-x: auto; white-space: nowrap; } /* Adjust code blocks for mobile */ .prose pre { font-size: 0.875rem; padding: 1rem; } } /* Prevent body scroll when mobile menu is open */ body.mobile-menu-open { overflow: hidden; } @media (max-width: 1024px) { body.mobile-menu-open { overflow: hidden; } }