Welcome to mirror list, hosted at ThFree Co, Russian Federation.

print.scss « css - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bca5c406af9d337385375a23f7750f76119d2b43 (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@media print {
	@page {
		size: A4;
		margin: 2.5cm 2cm 2cm 2.5cm; 
	}

	body {
		// position: fixed does not support scrolling and as such only prints one page
		position: absolute;
		overflow: visible!important;
	}

	#viewer[data-handler='text'] {
		// Hide top border
		border: none;
		width: 100%!important;
		// NcModal uses fixed, which will be cropped when printed
		position: absolute!important;

		.modal-header {
			// Hide modal header (close button)
			display: none!important;
		}
		.modal-container {
			// Make sure top aligned as we hided the menubar */
			top: 0px;
			height: fit-content;
		}
	}

	.text-editor {
		.text-menubar {
			// Hide menu bar
			display: none!important;
		}
		.action-item {
			// Hide table settings
			display: none!important;
		}
		.editor__content {
			// Margins set by page rule
			max-width: 100%;
		}
		.text-editor__wrapper {
			height: fit-content;
			position: unset;
		}

		div.ProseMirror {
			h1, h2, h3, h4, h5 {
				// orphaned headlines are ugly
				break-after: avoid;
			}
			.image, img, table {
				// try no page breaks within tables or images
				break-inside: avoid-page;
				// Some more indention
				max-width: 90%!important;
				margin: 5vw auto 5vw 5%!important;
			}

			// Add some borders below header and between columns
			th {
				color: black!important;
				font-weight: bold!important;
				border-width: 0 1px 2px 0!important;
				border-color: gray!important;
				border-style: none solid solid none!important;
			}
			th:last-of-type {
				border-width: 0 0 2px 0!important;
			}

			td {
				border-style: none solid none none!important;
				border-width: 1px!important;
				border-color: gray!important;
			}
			td:last-of-type {
				border: none!important;
			}
		}
	}
}