Commit | Line | Data |
---|---|---|
c947cf5f | 1 | .redactor-layer pre { |
97f8f467 | 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 | |
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; | |
22 | ||
23 | @include wcfFontHeadline; | |
24 | } | |
3d9f265d AE |
25 | |
26 | &.woltlabHtml { | |
27 | &::before { | |
28 | margin-bottom: 30px; | |
29 | } | |
30 | ||
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; | |
39 | ||
40 | @include wcfFontSmall; | |
41 | } | |
42 | } | |
97f8f467 | 43 | } |
442a3ea1 AE |
44 | |
45 | .codeBox { | |
46 | background-color: $wcfContentBackground; | |
47 | box-shadow: 0 0 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24); | |
48 | border-radius: 2px; | |
9e8632c0 | 49 | clear: both; |
0663e9fb | 50 | margin: 1em 0; |
ce04ba92 | 51 | overflow: hidden; |
442a3ea1 | 52 | padding: 10px; |
ce04ba92 AE |
53 | position: relative; |
54 | ||
55 | &.collapsed { | |
56 | max-height: 200px; | |
57 | ||
58 | > .toggleButton { | |
59 | bottom: 0; | |
60 | box-shadow: 0 -10px 50px 10px opacify($wcfContentBackground, .9); | |
61 | left: 0; | |
62 | padding-bottom: 10px; | |
63 | position: absolute; | |
64 | right: 0; | |
39eaca6d | 65 | z-index: 1; |
ce04ba92 AE |
66 | } |
67 | } | |
442a3ea1 AE |
68 | |
69 | > div { | |
ce04ba92 AE |
70 | > .codeBoxHeader { |
71 | align-items: center; | |
72 | display: flex; | |
73 | ||
c28ec2df AE |
74 | /* required to avoid layout jumping caused by the dynamically added 24px button */ |
75 | min-height: 24px; | |
76 | ||
ce04ba92 AE |
77 | > .codeBoxHeadline { |
78 | flex: 1 1 auto; | |
79 | padding: 0 10px; | |
80 | ||
81 | @include wcfFontHeadline; | |
82 | } | |
ce04ba92 AE |
83 | } |
84 | ||
070c42e0 TD |
85 | > .codeBoxCode { |
86 | padding-left: 7ch; | |
442a3ea1 | 87 | |
070c42e0 TD |
88 | > code { |
89 | display: block; | |
90 | overflow-x: auto; | |
ce04ba92 | 91 | font-family: Consolas, 'Courier New', monospace; |
ce04ba92 | 92 | |
070c42e0 TD |
93 | .codeBoxLine { |
94 | > a { | |
95 | margin-left: -7ch; | |
96 | overflow: hidden; | |
97 | position: absolute; | |
98 | text-align: right; | |
99 | text-overflow: ellipsis; | |
100 | white-space: nowrap; | |
101 | /* No one has line numbers greater than 999999 */ | |
102 | width: 6ch; | |
2d561c32 | 103 | |
070c42e0 TD |
104 | &::before { |
105 | content: attr(title); | |
106 | } | |
107 | } | |
108 | ||
109 | > span { | |
110 | white-space: pre-wrap; | |
111 | word-break: break-all; | |
112 | } | |
113 | ||
114 | &:target { | |
115 | background-color: rgba(255, 255, 102, 1); | |
116 | } | |
117 | } | |
442a3ea1 AE |
118 | } |
119 | } | |
120 | } | |
ce04ba92 AE |
121 | |
122 | > .toggleButton { | |
123 | background-color: opacify($wcfContentBackground, .9); | |
124 | cursor: pointer; | |
125 | display: block; | |
126 | padding: 10px 20px 0 10px; | |
127 | text-align: center; | |
128 | ||
129 | @include wcfFontSmall; | |
130 | } | |
442a3ea1 AE |
131 | } |
132 | ||
442a3ea1 | 133 | |
070c42e0 TD |
134 | /* PrismJS 1.15.0 |
135 | https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript&plugins=autoloader */ | |
136 | /** | |
137 | * prism.js default theme for JavaScript, CSS and HTML | |
138 | * Based on dabblet (http://dabblet.com) | |
139 | * @author Lea Verou | |
140 | */ | |
141 | ||
142 | .token.comment, | |
143 | .token.prolog, | |
144 | .token.doctype, | |
145 | .token.cdata { | |
146 | color: slategray; | |
147 | } | |
148 | ||
149 | .token.punctuation { | |
150 | color: #999; | |
151 | } | |
152 | ||
153 | .namespace { | |
154 | opacity: .7; | |
155 | } | |
156 | ||
157 | .token.property, | |
158 | .token.tag, | |
159 | .token.boolean, | |
160 | .token.number, | |
161 | .token.constant, | |
162 | .token.symbol, | |
163 | .token.deleted { | |
164 | color: #905; | |
165 | } | |
166 | ||
167 | .token.selector, | |
168 | .token.attr-name, | |
169 | .token.string, | |
170 | .token.char, | |
171 | .token.builtin, | |
172 | .token.inserted { | |
173 | color: #690; | |
174 | } | |
175 | ||
176 | .token.operator, | |
177 | .token.entity, | |
178 | .token.url, | |
179 | .language-css .token.string, | |
180 | .style .token.string { | |
181 | color: #9a6e3a; | |
182 | background: hsla(0, 0%, 100%, .5); | |
183 | } | |
184 | ||
185 | .token.atrule, | |
186 | .token.attr-value, | |
187 | .token.keyword { | |
188 | color: #07a; | |
189 | } | |
190 | ||
191 | .token.function, | |
192 | .token.class-name { | |
193 | color: #DD4A68; | |
194 | } | |
195 | ||
196 | .token.regex, | |
197 | .token.important, | |
198 | .token.variable { | |
199 | color: #e90; | |
200 | } | |
201 | ||
202 | .token.important, | |
203 | .token.bold { | |
204 | font-weight: bold; | |
205 | } | |
206 | .token.italic { | |
207 | font-style: italic; | |
208 | } | |
209 | ||
210 | .token.entity { | |
211 | cursor: help; | |
212 | } | |
213 |