File size: 1,642 Bytes
ccd9809
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply bg-office-bg text-office-text font-sans m-0 p-0 h-screen overflow-hidden;
  }

  /* Ẩn thanh cuộn nhưng vẫn cho phép cuộn */
  .hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
  .hide-scrollbar::-webkit-scrollbar {
    display: none;
  }
}

@media print {
  /* Ẩn các thành phần UI thừa hoàn toàn khỏi luồng layout */
  header, aside, footer, button, .fixed {
    display: none !important;
  }

  /* Reset lại toàn bộ khung layout (h-screen, overflow-hidden) để tài liệu chảy liền mạch */
  body, html, #app, 
  #app > div, 
  #app > div > div, 
  main, 
  #scroll-area {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
  }

  #main-editor {
    width: 210mm !important; /* Kích thước A4 chuẩn */
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    zoom: 1 !important; /* Hủy zoom của giao diện web để in đúng tỷ lệ */
  }

  /* Ngắt trang thông minh */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    break-after: avoid;
  }
  
  table, img, .katex-display {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  @page {
    size: A4;
    margin: 0mm; /* Tắt header/footer mặc định của trình duyệt */
  }
}