]> BookStack Code Mirror - bookstack/blob - resources/sass/_tinymce.scss
Fixed local_secure_restricted preventing attachment uploads
[bookstack] / resources / sass / _tinymce.scss
1
2 // Custom full screen mode
3 .tox.tox-fullscreen {
4   position: fixed;
5   top: 0;
6   height: 100%;
7   width: 100%;
8   max-width: 100%;
9   z-index: 100;
10 }
11
12 // In editor body overrides
13 .page-content.mce-content-body {
14   padding-block-start: 1rem;
15   padding-block-end: 1rem;
16   outline: 0;
17   display: block;
18 }
19
20 // Default styles for our custom root nodes
21 .page-content.mce-content-body doc-root {
22   display: block;
23 }
24 .page-content.mce-content-body code-block {
25   display: block;
26 }
27
28 // In editor line height override
29 .page-content.mce-content-body p {
30   line-height: 1.6;
31 }
32
33 // Pad out bottom of editor
34 body.page-content.mce-content-body  {
35   padding-bottom: 5rem;
36 }
37
38 // Remove svg background line in toolbar items
39 .tox .tox-pop__dialog .tox-toolbar {
40   background: transparent !important;
41 }
42
43 // Center toolbar items
44 .tox-toolbar__primary {
45   justify-content: center;
46 }
47
48 // Prevent scroll jumps on codemirror clicks
49 .page-content.mce-content-body code-block > * {
50   pointer-events: none;
51 }
52 .page-content.mce-content-body code-block pre {
53   display: none;
54 }
55
56 // Details/summary editor usability
57 .page-content.mce-content-body details summary {
58   pointer-events: none;
59 }
60 .page-content.mce-content-body details doc-root {
61   padding: $-s;
62   margin-left: (2px - $-s);
63   margin-right: (2px - $-s);
64   margin-bottom: (2px - $-s);
65   margin-top: (2px - $-s);
66   overflow: hidden;
67 }
68
69 /**
70  * Dark Mode Overrides
71  */
72 .dark-mode .tox .tox-toolbar__primary,
73 .dark-mode .tox .tox-menu,
74 .dark-mode .tox .tox-dialog__header,
75 .dark-mode .tox .tox-dialog,
76 .dark-mode .tox .tox-dialog__footer,
77 .dark-mode .tox .tox-pop__dialog,
78 .dark-mode .tox.tox-tinymce-aux .tox-toolbar__overflow {
79     background-color: #333 !important;
80 }
81 .dark-mode .tox .tox-tbtn svg,
82 .dark-mode .tox .tox-tbtn,
83 .dark-mode .tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled)
84 {
85   color: #dbdbdb;
86   fill: #dbdbdb;
87 }
88
89
90
91 /**
92  * Format Menu Hacks
93  */
94 .tox .tox-tbtn--bespoke .tox-tbtn__select-label {
95   width: 6em !important;
96 }
97 .tox-menu .tox-collection__item blockquote::before {
98   content: none;
99 }
100 .tox-menu .tox-collection__item blockquote {
101   border-left: 4px solid var(--color-primary) !important;
102   padding: 4px 6px !important;
103 }
104 .tox-menu .tox-collection__item blockquote {
105   border-left: 4px solid var(--color-primary) !important;
106   padding: 4px 6px !important;
107 }
108 .tox-menu .tox-collection__item p[style*="background-color"] {
109   padding: 4px 6px !important;
110   border-left: 3px solid currentColor !important;
111 }
112 .tox-menu .tox-collection__item[title^="<"] > div > div {
113   font-family: $mono !important;
114   border: 1px solid #DDD !important;
115   background-color: #EEE !important;
116   padding: 4px 6px !important;
117 }
118 .tox-menu .tox-collection__item-label {
119   line-height: normal !important;
120 }
121
122 /**
123  * Fake task list checkboxes
124  */
125 .page-content.mce-content-body .task-list-item {
126   margin-left: 0;
127   position: relative;
128 }
129 .page-content.mce-content-body .task-list-item > input[type="checkbox"] {
130   display: none;
131 }
132 .page-content.mce-content-body .task-list-item:before {
133   content: '';
134   display: inline-block;
135   border: 2px solid #CCC;
136   width: 12px;
137   height: 12px;
138   border-radius: 2px;
139   margin-right: 8px;
140   vertical-align: text-top;
141   cursor: pointer;
142   position: absolute;
143   left: -24px;
144   top: 4px;
145 }
146
147 .page-content.mce-content-body .task-list-item[checked]:before {
148   background-color: #CCC;
149   background-image: url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m8.4856 20.274-6.736-6.736 2.9287-2.7823 3.8073 3.8073 10.836-10.836 2.9287 2.9287z" stroke-width="1.4644"/></svg>');
150   background-position: 50% 50%;
151   background-size: 100% 100%;
152 }