]> BookStack Code Mirror - bookstack/blob - resources/sass/_tinymce.scss
Revamped workings of WYSIWYG code blocks
[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 // Center toolbar items
39 .tox-toolbar__primary {
40   justify-content: center;
41 }
42
43 // Prevent scroll jumps on codemirror clicks
44 .page-content.mce-content-body code-block > * {
45   pointer-events: none;
46 }
47 .page-content.mce-content-body code-block pre {
48   display: none;
49 }
50
51 // Details/summary editor usability
52 .page-content.mce-content-body details summary {
53   pointer-events: none;
54 }
55 .page-content.mce-content-body details doc-root {
56   padding: $-s;
57   margin-left: (2px - $-s);
58   margin-right: (2px - $-s);
59   margin-bottom: (2px - $-s);
60   margin-top: (2px - $-s);
61   overflow: hidden;
62 }
63
64 /**
65  * Dark Mode Overrides
66  */
67 .dark-mode .tox .tox-toolbar__primary,
68 .dark-mode .tox .tox-menu,
69 .dark-mode .tox .tox-dialog__header,
70 .dark-mode .tox .tox-dialog,
71 .dark-mode .tox .tox-dialog__footer,
72 .dark-mode .tox .tox-pop__dialog,
73 .dark-mode .tox.tox-tinymce-aux .tox-toolbar__overflow {
74     background-color: #333;
75 }
76 .dark-mode .tox .tox-tbtn svg,
77 .dark-mode .tox .tox-tbtn,
78 .dark-mode .tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled)
79 {
80   color: #dbdbdb;
81   fill: #dbdbdb;
82 }
83
84
85
86 /**
87  * Format Menu Hacks
88  */
89 .tox .tox-tbtn--bespoke .tox-tbtn__select-label {
90   width: 6em !important;
91 }
92 .tox-menu .tox-collection__item blockquote::before {
93   content: none;
94 }
95 .tox-menu .tox-collection__item blockquote {
96   border-left: 4px solid var(--color-primary) !important;
97   padding: 4px 6px !important;
98 }
99 .tox-menu .tox-collection__item blockquote {
100   border-left: 4px solid var(--color-primary) !important;
101   padding: 4px 6px !important;
102 }
103 .tox-menu .tox-collection__item p[style*="background-color"] {
104   padding: 4px 6px !important;
105   border-left: 3px solid currentColor !important;
106 }
107 .tox-menu .tox-collection__item[title^="<"] > div > div {
108   font-family: $mono !important;
109   border: 1px solid #DDD !important;
110   background-color: #EEE !important;
111   padding: 4px 6px !important;
112 }
113 .tox-menu .tox-collection__item-label {
114   line-height: normal !important;
115 }