/
MarkZhukov
/
web
Обзор
Документация
Войти
/
MarkZhukov
/
web
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
task12
static/css/print.css
131 строка
4 KB
markkentos
add pdf view
04 июн 2026, 01:25
04 июн 2026, 01:25
bb001aa
Код
Авторство
О чём код?
/* static/css/print.css */ @media print { /* Глобальное скрытие всех интерактивных и навигационных элементов */ header, #accessibility-bar, .role-switcher, #accessibility-toggle-btn, .actions, .messages, .fav-btn, .button, .card > .hint, .arrival-actions, /* Кнопки в виджете новинок */ .arrival-date /* Дата в виджете новинок */ { display: none !important; } /* Скрытие конкретных виджетов на главной странице */ #react-search-widget, /* Виджет поиска на React */ .promotions-list, /* Виджет акций (и его родительская карточка) */ .promotions-list + .card { display: none !important; } /* Общие сбросы стилей для печати */ body { font-family: 'Times New Roman', serif; background-color: #ffffff !important; color: #000000 !important; font-size: 12pt; line-height: 1.3; -webkit-print-color-adjust: economy; /* Экономия чернил */ print-color-adjust: economy; } /* Убираем тени, границы, лишние фоны */ .card, .detail-card, .search-product-card, .arrival-item, .stat-box, .promotion-card, .cart-item-row { box-shadow: none !important; border: 1px solid #dddddd !important; background: #fff !important; page-break-inside: avoid; /* Предотвращаем разрыв карточки между страницами */ margin-bottom: 20px; } /* Стили для ссылок */ a { color: #000 !important; text-decoration: none; font-weight: normal !important; } /* Показываем URL после ссылки */ a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; } /* Не показываем URL для внутренних ссылок */ a[href^="/"]:after, a[href^="#"]:after, a[href^="javascript"]:after { content: ""; } /* Заголовки */ h1, h2, h3, h4 { font-family: 'Times New Roman', serif; color: #000 !important; border: 0 !important; padding: 0 !important; margin-bottom: 12px; page-break-after: avoid; } h1 { font-size: 24pt; } h2 { font-size: 18pt; } h3 { font-size: 14pt; } /* Адаптация таблиц */ table { width: 100%; page-break-inside: auto; border-collapse: collapse; } th, td { border: 1px solid #dddddd; padding: 8px; text-align: left; } thead { display: table-header-group; /* Повторяем заголовок таблицы на каждой странице */ } tr { page-break-inside: avoid; page-break-after: auto; } /* Адаптация сеток */ .dashboard-grid, .product-detail-grid, .cart-grid { display: block !important; /* Превращаем гриды в обычные блоки */ } .dashboard-grid > .column { width: 100%; } /* Детальная страница товара */ .product-detail-grid > div { width: 100%; } .price-main { font-size: 18pt !important; } /* Корзина */ .cart-item-row { display: grid; grid-template-columns: 4fr 1fr 1fr; page-break-inside: avoid; } }