Commit | Line | Data |
---|---|---|
c947cf5f | 1 | .redactor-layer pre { |
97f8f467 | 2 | background-color: rgb(255, 255, 255) !important; |
8a52619a | 3 | box-shadow: 0 0 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); |
97f8f467 AE |
4 | border-radius: 2px; |
5 | color: rgb(68, 68, 68) !important; | |
8a52619a | 6 | font-family: Consolas, "Courier New", monospace; |
97f8f467 AE |
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; | |
8a52619a | 13 | |
3d9f265d AE |
14 | &:not(.redactorCalcHeight)::before, |
15 | &.woltlabHtml::before { | |
333f26a7 | 16 | color: $wcfContentLink; |
97e54d27 | 17 | content: attr(data-title); |
7b83aa87 | 18 | cursor: pointer; |
97f8f467 AE |
19 | display: block; |
20 | font-family: $wcfFontFamily; | |
21 | margin-bottom: 20px; | |
8a52619a | 22 | |
97f8f467 AE |
23 | @include wcfFontHeadline; |
24 | } | |
8a52619a | 25 | |
3d9f265d AE |
26 | &.woltlabHtml { |
27 | &::before { | |
28 | margin-bottom: 30px; | |
29 | } | |
8a52619a | 30 | |
3d9f265d AE |
31 | &::after { |
32 | color: $wcfContentDimmedText; | |
33 | content: attr(data-description); | |
34 | cursor: pointer; | |
35 | display: block; | |
36 | font-family: $wcfFontFamily; | |
37 | position: absolute; | |
38 | top: 32px; | |
8a52619a | 39 | |
3d9f265d AE |
40 | @include wcfFontSmall; |
41 | } | |
42 | } | |
97f8f467 | 43 | } |
442a3ea1 AE |
44 | |
45 | .codeBox { | |
46 | background-color: $wcfContentBackground; | |
8a52619a | 47 | box-shadow: 0 0 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); |
442a3ea1 | 48 | border-radius: 2px; |
9e8632c0 | 49 | clear: both; |
0663e9fb | 50 | margin: 1em 0; |
442a3ea1 | 51 | padding: 10px; |
ce04ba92 | 52 | position: relative; |
8a52619a | 53 | |
ce04ba92 | 54 | &.collapsed { |
e587215c TD |
55 | .codeBoxCode { |
56 | max-height: 200px; | |
57 | overflow: hidden; | |
58 | } | |
8a52619a | 59 | |
ce04ba92 AE |
60 | > .toggleButton { |
61 | bottom: 0; | |
ce04ba92 AE |
62 | left: 0; |
63 | padding-bottom: 10px; | |
64 | position: absolute; | |
65 | right: 0; | |
39eaca6d | 66 | z-index: 1; |
8a52619a | 67 | |
c02d0e01 | 68 | &::before { |
8a52619a TD |
69 | background-image: linear-gradient( |
70 | to top, | |
71 | opacify($wcfContentBackground, 0.9), | |
72 | transparentize($wcfContentBackground, 1) | |
73 | ); | |
c02d0e01 AE |
74 | content: ""; |
75 | height: 60px; | |
76 | left: 0; | |
77 | pointer-events: none; | |
78 | position: absolute; | |
79 | right: 0; | |
80 | top: -60px; | |
81 | } | |
ce04ba92 AE |
82 | } |
83 | } | |
8a52619a | 84 | |
e587215c TD |
85 | .codeBoxHeader { |
86 | position: sticky; | |
87 | top: 50px; | |
88 | z-index: 1; | |
89 | padding: 10px 10px 10px; | |
90 | margin: -10px -10px 0; | |
91 | background-color: $wcfContentBackground; | |
8a52619a | 92 | |
e587215c TD |
93 | align-items: center; |
94 | display: flex; | |
8a52619a | 95 | |
e587215c TD |
96 | /* required to avoid layout jumping caused by the dynamically added 24px button */ |
97 | min-height: 24px; | |
8a52619a | 98 | |
e587215c TD |
99 | > .codeBoxHeadline { |
100 | flex: 1 1 auto; | |
101 | padding: 0 10px; | |
8a52619a | 102 | |
e587215c | 103 | @include wcfFontHeadline; |
ce04ba92 | 104 | } |
e587215c | 105 | } |
8a52619a | 106 | |
e587215c TD |
107 | .codeBoxCode { |
108 | position: relative; | |
109 | padding-left: 7ch; | |
8a52619a | 110 | |
e587215c TD |
111 | > code { |
112 | display: block; | |
113 | overflow-x: auto; | |
8a52619a TD |
114 | font-family: Consolas, "Courier New", monospace; |
115 | ||
e587215c | 116 | .codeBoxLine { |
1149a775 | 117 | display: block; |
8a52619a | 118 | |
e587215c TD |
119 | > a { |
120 | margin-left: -7ch; | |
121 | overflow: hidden; | |
122 | position: absolute; | |
123 | text-align: right; | |
124 | text-overflow: ellipsis; | |
125 | white-space: nowrap; | |
126 | /* No one has line numbers greater than 999999 */ | |
127 | width: 6ch; | |
8a52619a | 128 | |
e587215c TD |
129 | &::before { |
130 | content: attr(title); | |
070c42e0 TD |
131 | } |
132 | } | |
8a52619a | 133 | |
e587215c TD |
134 | > span { |
135 | white-space: pre-wrap; | |
136 | word-break: break-all; | |
137 | } | |
8a52619a | 138 | |
e587215c TD |
139 | &:target { |
140 | background-color: rgba(255, 255, 102, 1); | |
141 | } | |
442a3ea1 AE |
142 | } |
143 | } | |
144 | } | |
8a52619a | 145 | |
ce04ba92 | 146 | > .toggleButton { |
8a52619a | 147 | background-color: opacify($wcfContentBackground, 0.9); |
ce04ba92 AE |
148 | cursor: pointer; |
149 | display: block; | |
150 | padding: 10px 20px 0 10px; | |
151 | text-align: center; | |
8a52619a | 152 | |
ce04ba92 AE |
153 | @include wcfFontSmall; |
154 | } | |
442a3ea1 AE |
155 | } |
156 | ||
e587215c TD |
157 | .anchorFixedHeader:not(.disableAnchorFixedHeader):target .codeBoxHeader { |
158 | top: -30px; /* see wsc31.scss */ | |
159 | } | |
160 | ||
13a849f3 AE |
161 | .dialogContent .codeBox .codeBoxHeader { |
162 | /* Prevent the header being sticky inside dialogs, which doesn't really work. */ | |
163 | position: static; | |
164 | } | |
165 | ||
070c42e0 TD |
166 | /* PrismJS 1.15.0 |
167 | https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript&plugins=autoloader */ | |
168 | /** | |
169 | * prism.js default theme for JavaScript, CSS and HTML | |
170 | * Based on dabblet (http://dabblet.com) | |
171 | * @author Lea Verou | |
172 | */ | |
8a52619a TD |
173 | |
174 | .token.comment, | |
175 | .token.prolog, | |
176 | .token.doctype, | |
177 | .token.cdata { | |
178 | color: slategray; | |
179 | } | |
180 | ||
181 | .token.punctuation { | |
182 | color: #999; | |
183 | } | |
184 | ||
185 | .namespace { | |
186 | opacity: 0.7; | |
187 | } | |
188 | ||
189 | .token.property, | |
190 | .token.tag, | |
191 | .token.boolean, | |
192 | .token.number, | |
193 | .token.constant, | |
194 | .token.symbol, | |
195 | .token.deleted { | |
196 | color: #905; | |
197 | } | |
198 | ||
199 | .token.selector, | |
200 | .token.attr-name, | |
201 | .token.string, | |
202 | .token.char, | |
203 | .token.builtin, | |
204 | .token.inserted { | |
205 | color: #690; | |
206 | } | |
207 | ||
208 | .token.operator, | |
209 | .token.entity, | |
210 | .token.url, | |
211 | .language-css .token.string, | |
212 | .style .token.string { | |
213 | color: #9a6e3a; | |
214 | background: hsla(0, 0%, 100%, 0.5); | |
215 | } | |
216 | ||
217 | .token.atrule, | |
218 | .token.attr-value, | |
219 | .token.keyword { | |
220 | color: #07a; | |
221 | } | |
222 | ||
223 | .token.function, | |
224 | .token.class-name { | |
225 | color: #dd4a68; | |
226 | } | |
227 | ||
228 | .token.regex, | |
229 | .token.important, | |
230 | .token.variable { | |
231 | color: #e90; | |
232 | } | |
233 | ||
234 | .token.important, | |
235 | .token.bold { | |
236 | font-weight: 600; | |
237 | } | |
238 | .token.italic { | |
239 | font-style: italic; | |
240 | } | |
241 | ||
242 | .token.entity { | |
243 | cursor: help; | |
244 | } |