/
counterbugtech
/
KontrBugCAD
Обзор
Документация
Войти
/
counterbugtech
/
KontrBugCAD
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
css/mobile.css
499 строк
13 KB
counterbugtech
first commit
04 мар 2026, 11:25
Верифицирован
04 мар 2026, 11:25
b2afbd6
Код
Авторство
О чём код?
/* ========== МОБИЛЬНАЯ ВЕРСИЯ (ТОЛЬКО CSS) ========== */ /* Стили для всех мобильных устройств */ @media (max-width: 768px) { /* 1. ОСНОВНОЙ КОНТЕЙНЕР И НАВИГАЦИЯ */ body { overflow-x: hidden; } .navbar { height: 50px !important; padding: 0 5px !important; position: fixed !important; top: 0; left: 0; right: 0; z-index: 1000; } .logo span { font-size: 14px !important; white-space: nowrap; } .logo i { font-size: 20px !important; margin-right: 5px !important; } /* 2. ТУЛБАР - ГОРИЗОНТАЛЬНАЯ ПРОКРУТКА */ .toolbar-container { overflow-x: auto !important; overflow-y: hidden !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 5px !important; height: 50px !important; position: absolute; left: 120px; right: 10px; } .toolbar-container::-webkit-scrollbar { display: none; } .tool-section { flex-shrink: 0; margin-right: 5px; } .tool-group { gap: 4px !important; } /* 3. КНОПКИ ИНСТРУМЕНТОВ - БОЛЬШЕ ДЛЯ ПАЛЬЦЕВ */ .tool-btn { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; font-size: 18px !important; margin: 2px !important; touch-action: manipulation; } /* Увеличиваем иконки на кнопках */ .tool-btn i, .tool-btn .cad-icon { font-size: 20px !important; transform: scale(1.1); } /* 4. ВЫПАДАЮЩИЕ МЕНЮ - ЛЕГКО ДОТЯНУТЬСЯ */ .dropdown-menu { position: fixed !important; bottom: 50px !important; left: 10px !important; right: 10px !important; top: auto !important; max-height: 50vh !important; overflow-y: auto !important; z-index: 2000; border: 2px solid var(--primary-color) !important; } .dropdown-menu a { padding: 16px 20px !important; font-size: 16px !important; min-height: 50px; display: flex; align-items: center; gap: 15px; } .dropdown-menu a i, .dropdown-menu a .cad-icon { font-size: 20px !important; width: 30px; } /* 5. ПАНЕЛЬ СВОЙСТВ - ЛЕГКО ДОСТУПНА */ .properties-panel { position: fixed !important; top: 50px !important; bottom: 40px !important; right: 0; left: 0; width: auto !important; z-index: 999; transform: translateX(100%); transition: transform 0.3s ease; } .properties-panel.active { transform: translateX(0); } .panel-tabs { position: fixed !important; top: 50px !important; left: 0 !important; right: 0 !important; flex-direction: row !important; height: 50px !important; z-index: 1000; background: var(--bg-tertiary); } .panel-tab { padding: 15px !important; font-size: 12px !important; } .panel-tab i { font-size: 18px !important; margin-bottom: 2px; } .panel-content { padding-top: 50px !important; padding-bottom: 60px !important; } /* 6. ОБЛАСТЬ ПРОСМОТРА - БОЛЬШЕ МЕСТА */ .viewport-container { position: fixed !important; top: 50px !important; bottom: 40px !important; left: 0 !important; right: 0 !important; } #viewport { width: 100% !important; height: 100% !important; touch-action: pan-x pan-y; } /* 7. КООРДИНАТЫ И ИНФОРМАЦИЯ - УПРОЩАЕМ */ .coordinates { position: fixed !important; bottom: 45px !important; left: 10px !important; right: 10px !important; text-align: center; padding: 8px !important; font-size: 12px !important; background: rgba(0, 0, 0, 0.8) !important; border: 1px solid var(--primary-color) !important; } /* 8. КНОПКИ ВИДОВ - ДОСТУПНЫ */ .compact-view-controls { position: fixed !important; top: 60px !important; left: 10px !important; z-index: 100; } .view-compass { width: 150px !important; height: 150px !important; } .view-btn-compact { width: 36px !important; height: 36px !important; font-size: 16px !important; background: rgba(0, 0, 0, 0.8) !important; border: 2px solid var(--primary-color) !important; } /* 9. ИНСТРУМЕНТЫ СКЕТЧА - ГОРИЗОНТАЛЬНАЯ ПРОКРУТКА */ #sketchToolsSection { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100vw; } #sketchToolsSection::-webkit-scrollbar { display: none; } .sketch-tool-btn { flex-shrink: 0 !important; width: 50px !important; height: 50px !important; margin: 0 2px !important; } /* 10. СТАТУС БАР - КОМПАКТНЫЙ */ .status-bar { position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; height: 40px !important; padding: 0 10px !important; z-index: 1000; flex-wrap: wrap; } .status-left, .status-right { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .status-left { text-align: left; } .status-right { text-align: right; } #modeIndicator, #selectedInfo, #fpsCounter, #version { font-size: 11px !important; } /* 11. БИБЛИОТЕКА - БОЛЬШИЕ КАРТОЧКИ */ .library-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; gap: 10px !important; } .library-item { padding: 15px !important; min-height: 120px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; } .library-item-icon { margin-right: 0 !important; margin-bottom: 10px; } .library-item-icon i { font-size: 32px !important; } /* 12. МОДАЛЬНЫЕ ОКНА - ПОЛНЫЙ ЭКРАН */ .modal-content { width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; border-radius: 0 !important; margin: 0 !important; } .modal-body { max-height: calc(100vh - 140px) !important; overflow-y: auto !important; } /* 13. ПРОЕКТ ИНФО - УПРОЩАЕМ */ .project-info { position: absolute !important; top: 5px; right: 40px; padding-left: 0 !important; border-left: none !important; } #projectName { font-size: 12px !important; max-width: 100px !important; overflow: hidden; text-overflow: ellipsis; } .status { position: absolute !important; top: 10px; right: 10px; padding: 4px 8px !important; font-size: 11px !important; min-width: 60px !important; } /* 14. УБИРАЕМ ЛИШНИЕ ЭЛЕМЕНТЫ */ .controls-hint { display: none !important; } /* 15. ДЕЛАЕМ ВСЕ ПОЛЯ ВВОДА БОЛЬШЕ */ input, select, textarea { font-size: 16px !important; /* Предотвращает масштабирование iOS */ min-height: 44px !important; /* Минимальная высота для касания */ } .modal-input, .modal-select, .search-box input { padding: 12px !important; } /* 16. УВЕЛИЧИВАЕМ РАЗМЕРЫ СПИСКОВ */ .scene-item, .history-item { padding: 15px !important; margin-bottom: 10px !important; min-height: 50px; } /* 17. СКРЫВАЕМ НЕКОТОРЫЕ ЭЛЕМЕНТЫ В МЕНЮ ТЕМ */ .theme-options .theme-btn span:not(.fa) { display: none; } .theme-btn { justify-content: center; padding: 12px !important; } } /* ДОПОЛНИТЕЛЬНО ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ */ @media (max-width: 480px) { .logo span { display: none !important; } .toolbar-container { left: 50px; } .tool-btn { width: 40px !important; height: 40px !important; font-size: 16px !important; } .view-compass { width: 130px !important; height: 130px !important; } .view-btn-compact { width: 32px !important; height: 32px !important; } .panel-tab { padding: 12px 8px !important; font-size: 10px !important; } .panel-tab i { font-size: 16px !important; } .library-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important; } } /* ДЛЯ ГОРИЗОНТАЛЬНОЙ ОРИЕНТАЦИИ */ @media (max-width: 768px) and (orientation: landscape) { .navbar { height: 40px !important; } .toolbar-container { height: 40px !important; } .tool-btn { width: 38px !important; height: 38px !important; } .properties-panel { top: 40px !important; } .panel-tabs { top: 40px !important; height: 40px !important; } .panel-tab { padding: 10px !important; } .viewport-container { top: 40px !important; } .compact-view-controls { top: 45px !important; } .status-bar { height: 30px !important; } .panel-content { padding-top: 40px !important; } /* АНИМАЦИЯ ДЛЯ ПАНЕЛИ СВОЙСТВ */ @keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } } @keyframes slideOutRight { from { transform: translateX(0); } to { transform: translateX(100%); } } .properties-panel:not(.active) { animation: slideOutRight 0.3s ease forwards; } .properties-panel.active { animation: slideInRight 0.3s ease forwards; } /* УЛУЧШЕНИЕ ДЛЯ СЕНСОРНЫХ УСТРОЙСТВ */ @media (hover: none) and (pointer: coarse) { /* Убираем ховер-эффекты, заменяем на активные */ .tool-btn:hover, .sketch-tool:hover, .scene-item:hover { background: var(--hover-overlay) !important; transform: none !important; } .tool-btn:active, .sketch-tool:active, .scene-item:active { background: var(--active-overlay) !important; transform: scale(0.95) !important; transition: transform 0.1s; } /* Увеличиваем зону клика для выпадающих меню */ .dropdown-menu a { padding: 20px !important; } /* Делаем скролл более плавным */ * { -webkit-overflow-scrolling: touch; } } /* ПРЕДОТВРАЩЕНИЕ ВЫДЕЛЕНИЯ ТЕКСТА ПРИ КАСАНИИ */ * { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; } }