Commit | Line | Data |
---|---|---|
97f8f467 AE |
1 | .redactor-editor pre { |
2 | background-color: rgb(255, 255, 255) !important; | |
eb63b8f2 | 3 | box-shadow: 0 0 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24); |
97f8f467 AE |
4 | border-radius: 2px; |
5 | color: rgb(68, 68, 68) !important; | |
6 | font-family: Consolas, 'Courier New', monospace; | |
7 | margin: 1em 0; | |
8 | padding: 10px 20px; | |
9 | position: relative; | |
2ef6247c AE |
10 | white-space: pre-wrap; |
11 | word-break: break-all; | |
12 | word-wrap: break-word; | |
97f8f467 | 13 | |
adb94be6 | 14 | &:not(.redactorCalcHeight)::before { |
333f26a7 | 15 | color: $wcfContentLink; |
97e54d27 | 16 | content: attr(data-title); |
7b83aa87 | 17 | cursor: pointer; |
97f8f467 AE |
18 | display: block; |
19 | font-family: $wcfFontFamily; | |
20 | margin-bottom: 20px; | |
21 | ||
22 | @include wcfFontHeadline; | |
23 | } | |
24 | } | |
442a3ea1 AE |
25 | |
26 | .codeBox { | |
27 | background-color: $wcfContentBackground; | |
28 | box-shadow: 0 0 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24); | |
29 | border-radius: 2px; | |
9e8632c0 | 30 | clear: both; |
0663e9fb | 31 | margin: 1em 0; |
ce04ba92 | 32 | overflow: hidden; |
442a3ea1 | 33 | padding: 10px; |
ce04ba92 AE |
34 | position: relative; |
35 | ||
36 | &.collapsed { | |
37 | max-height: 200px; | |
38 | ||
39 | > .toggleButton { | |
40 | bottom: 0; | |
41 | box-shadow: 0 -10px 50px 10px opacify($wcfContentBackground, .9); | |
42 | left: 0; | |
43 | padding-bottom: 10px; | |
44 | position: absolute; | |
45 | right: 0; | |
39eaca6d | 46 | z-index: 1; |
ce04ba92 AE |
47 | } |
48 | } | |
442a3ea1 AE |
49 | |
50 | > div { | |
ce04ba92 AE |
51 | > .codeBoxHeader { |
52 | align-items: center; | |
53 | display: flex; | |
54 | ||
55 | > .codeBoxHeadline { | |
56 | flex: 1 1 auto; | |
57 | padding: 0 10px; | |
58 | ||
59 | @include wcfFontHeadline; | |
60 | } | |
61 | ||
62 | > .codeBoxPlainSource { | |
63 | flex: 0 0 auto; | |
64 | margin-left: 10px; | |
65 | } | |
66 | } | |
67 | ||
442a3ea1 | 68 | > ol { |
ce04ba92 | 69 | margin: 20px 0 0 3.4em !important; |
442a3ea1 AE |
70 | position: relative; |
71 | ||
72 | &::before { | |
73 | border-right: 1px solid $wcfContentBorderInner; | |
74 | bottom: 0; | |
75 | content: ""; | |
ce04ba92 | 76 | left: -5px; |
442a3ea1 AE |
77 | position: absolute; |
78 | top: 0; | |
79 | } | |
80 | ||
81 | > li { | |
ce04ba92 | 82 | font-family: Consolas, 'Courier New', monospace; |
442a3ea1 | 83 | padding-left: 5px; |
ce04ba92 AE |
84 | position: relative; |
85 | white-space: pre-wrap; | |
86 | word-break: break-all; | |
87 | word-wrap: break-word; | |
2d561c32 | 88 | z-index: 1; |
ce04ba92 AE |
89 | |
90 | .lineAnchor { | |
91 | bottom: 0; | |
92 | left: -3.4em; | |
93 | position: absolute; | |
94 | top: 0; | |
95 | width: 3.4em; | |
96 | } | |
2d561c32 AE |
97 | } |
98 | } | |
99 | } | |
100 | ||
101 | .codeBoxJumpAnchor:target { | |
102 | height: 100%; | |
103 | pointer-events: none; | |
104 | position: absolute; | |
105 | width: 100%; | |
106 | z-index: -1; | |
107 | ||
108 | &::after { | |
109 | background-color: rgba(255, 255, 102, 1); | |
110 | bottom: 0; | |
111 | content: ""; | |
112 | display: block; | |
113 | height: 100%; | |
114 | left: 0; | |
115 | position: absolute; | |
116 | right: 0; | |
117 | top: 0; | |
118 | } | |
119 | ||
120 | @include screen-md-down { | |
121 | top: -52px; | |
122 | ||
123 | &::after { | |
124 | top: 52px; | |
125 | } | |
126 | } | |
127 | ||
128 | @include screen-lg { | |
129 | top: -50px; | |
130 | ||
131 | &::after { | |
132 | top: 50px; | |
442a3ea1 AE |
133 | } |
134 | } | |
135 | } | |
ce04ba92 AE |
136 | |
137 | > .toggleButton { | |
138 | background-color: opacify($wcfContentBackground, .9); | |
139 | cursor: pointer; | |
140 | display: block; | |
141 | padding: 10px 20px 0 10px; | |
142 | text-align: center; | |
143 | ||
144 | @include wcfFontSmall; | |
145 | } | |
442a3ea1 AE |
146 | } |
147 | ||
148 | /* ############## Code Styles ############## */ | |
149 | ||
150 | /* -- -- -- Code Box -- -- -- */ | |
151 | ||
152 | .codeBox .hlQuotes { | |
153 | color: red; | |
154 | } | |
155 | ||
156 | .codeBox .hlComments, | |
157 | .codeBox .hlOperators { | |
158 | color: green; | |
159 | } | |
160 | ||
161 | .codeBox .hlKeywords1 { | |
162 | color: blue; | |
163 | } | |
164 | ||
165 | .codeBox .hlKeywords2 { | |
166 | color: darkred; | |
167 | } | |
168 | ||
169 | .codeBox .hlKeywords3 { | |
170 | color: darkviolet; | |
171 | } | |
172 | ||
173 | .codeBox .hlKeywords4 { | |
174 | color: darkgoldenrod; | |
175 | } | |
176 | ||
177 | .codeBox .hlKeywords5 { | |
178 | color: crimson; | |
179 | } | |
180 | ||
181 | .codeBox .hlNumbers { | |
182 | color: darkorange; | |
183 | } | |
184 | ||
185 | /* -- -- -- Code Highlighters -- -- -- */ | |
186 | ||
187 | /* DIFF */ | |
188 | ||
189 | .diffHighlighter .hlComments { | |
190 | color: darkviolet; | |
191 | } | |
192 | ||
193 | .diffHighlighter .hlRemoved { | |
194 | color: red; | |
195 | } | |
196 | ||
197 | .diffHighlighter .hlAdded { | |
198 | color: green; | |
199 | } | |
200 | ||
201 | /* PHP */ | |
202 | ||
203 | .phpHighlighter .hlKeywords2 { | |
204 | color: green; | |
205 | } | |
206 | ||
207 | .phpHighlighter .hlComments { | |
208 | color: darkgoldenrod; | |
209 | } | |
210 | ||
211 | /* CSS */ | |
212 | ||
213 | .cssHighlighter .hlComments { | |
214 | color: #236e26; | |
215 | } | |
216 | ||
217 | .cssHighlighter .hlColors { | |
218 | color: #751116; | |
219 | } | |
220 | ||
221 | .cssHighlighter .hlNumbers, | |
222 | .sqlHighlighter .hlNumbers { | |
223 | color: #1906fd; | |
224 | } | |
225 | ||
226 | .cssHighlighter .hlKeywords1 { | |
227 | color: #87154f; | |
228 | } | |
229 | ||
230 | .cssHighlighter .hlKeywords2 { | |
231 | color: #994509; | |
232 | } | |
233 | ||
234 | .cssHighlighter .hlKeywords3, | |
235 | .cssHighlighter .hlKeywords4 { | |
236 | color: inherit; | |
237 | } | |
238 | ||
239 | /* SQL */ | |
240 | ||
241 | .sqlHighlighter .hlKeywords1 { | |
242 | color: #663821; | |
243 | } | |
244 | ||
245 | .sqlHighlighter .hlKeywords2 { | |
246 | color: #871550; | |
247 | } |