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