Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 1 | @charset "utf-8"; |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 2 | @import "../util"; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 3 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 4 | $left-padding: 4em; // 32pt; // 2.8em; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 5 | $border-size: 2px; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 6 | $bracket-size: .4em; // 4pt; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 7 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 8 | /** |
| 9 | * Virtual Collection Builder |
| 10 | */ |
Akron | 5c829e9 | 2017-05-12 18:10:00 +0200 | [diff] [blame] | 11 | |
Akron | 49f88cc | 2018-09-11 11:06:19 +0200 | [diff] [blame] | 12 | .vc { |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 13 | margin-top: 4pt; |
| 14 | |
Akron | 451ed5e | 2018-11-12 10:52:33 +0100 | [diff] [blame] | 15 | .builder { |
| 16 | position: initial; |
| 17 | } |
| 18 | |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 19 | .docGroup { |
| 20 | position: relative; |
Akron | 9065481 | 2018-08-29 18:57:23 +0200 | [diff] [blame] | 21 | |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 22 | display: inline-block; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 23 | margin-left: $left-padding; // 28pt |
| 24 | |
| 25 | .docGroup { display: block; } |
| 26 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 27 | padding: 4pt 2pt 4pt 0pt; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 28 | border: { |
| 29 | radius: $standard-border-radius * 2; |
| 30 | style: solid; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 31 | width: 0 $bracket-size; // .6em .5em |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 32 | } |
| 33 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 34 | &[data-operation] { |
| 35 | > .doc:first-child::before, |
| 36 | > .docGroup:first-child::before { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 37 | content: none; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 38 | } |
| 39 | > .doc::before, |
| 40 | > .docGroup::before { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 41 | display: inline-block; |
| 42 | position: absolute; |
| 43 | text-align: right; |
| 44 | width: $left-padding; |
| 45 | margin-left: -1 * ($left-padding + .5em); // -28pt |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 46 | line-height: 1.5em; |
| 47 | border-top: $border-size solid transparent; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 48 | } |
| 49 | > .docGroup::before { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 50 | margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size); |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 51 | } |
| 52 | } |
| 53 | |
| 54 | // Or operation |
| 55 | &[data-operation=or] { |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 56 | > .doc::before, |
| 57 | > .docGroup::before { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 58 | // This will be overruled by JS! |
| 59 | content: "or"; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 60 | } |
| 61 | } |
| 62 | |
| 63 | // And operation |
| 64 | &[data-operation=and] { |
| 65 | > .doc::before, |
| 66 | > .docGroup::before { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 67 | // This will be overruled by JS! |
| 68 | content: "and"; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 69 | } |
| 70 | } |
| 71 | |
| 72 | |
| 73 | /** |
| 74 | * All operators on groups |
| 75 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 76 | > .operators { |
| 77 | position: absolute; |
| 78 | display: block; |
| 79 | top: 10px; |
| 80 | vertical-align: middle; |
| 81 | left: 3px; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 82 | > span:first-child { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 83 | border: { |
| 84 | top-left-radius: 0; |
| 85 | bottom-left-radius: 0; |
| 86 | } |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 87 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 88 | margin-left: 100%; |
| 89 | padding: 0; |
| 90 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 91 | } |
| 92 | |
Akron | 49f88cc | 2018-09-11 11:06:19 +0200 | [diff] [blame] | 93 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 94 | /** |
| 95 | * All document rules |
| 96 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 97 | .doc { |
Akron | 49f88cc | 2018-09-11 11:06:19 +0200 | [diff] [blame] | 98 | line-height: 170%; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 99 | padding-left: $left-padding; |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 100 | > span + span, |
Akron | 7945237 | 2018-04-11 14:24:19 +0200 | [diff] [blame] | 101 | > span + div + span, |
| 102 | > span + ul + span { |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 103 | margin-left: 5pt; |
| 104 | } |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 105 | |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 106 | > span.key, |
| 107 | > span.value { |
| 108 | font-weight: bold; |
Akron | b19803c | 2018-08-16 16:39:42 +0200 | [diff] [blame] | 109 | } |
| 110 | > span.value { |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 111 | &[data-type=regex] { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 112 | font-style: italic; |
| 113 | &::after, |
| 114 | &::before { |
| 115 | content: '/'; |
| 116 | } |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 117 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 118 | } |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 119 | |
Akron | ebc9666 | 2018-08-29 17:36:20 +0200 | [diff] [blame] | 120 | // Unspecified value |
| 121 | &.unspecified > span, span.unspecified { |
| 122 | padding: 0 4px; |
| 123 | box-shadow: $choose-box-shadow; |
| 124 | border: { |
| 125 | style: solid; |
| 126 | width: $border-size; |
| 127 | radius: $standard-border-radius; |
| 128 | } |
| 129 | @include choose-item; |
| 130 | &:hover { |
| 131 | @include choose-hover; |
| 132 | } |
| 133 | } |
| 134 | |
Akron | b19803c | 2018-08-16 16:39:42 +0200 | [diff] [blame] | 135 | > span.key.fixed { |
| 136 | color: $light-green; |
| 137 | } |
| 138 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 139 | /** |
| 140 | * All operators on docs |
| 141 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 142 | > .operators { |
| 143 | display: inline-block; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 144 | margin-left: 10px; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 145 | } |
| 146 | > span.key { |
| 147 | position: relative; |
| 148 | > ul { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 149 | margin: 0; |
| 150 | margin-left: 3.3em; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | .rewritten { |
| 156 | .rewrite { |
| 157 | margin-left: 4pt; |
| 158 | display: inline-block; |
| 159 | color: $dark-orange; |
| 160 | &::after { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 161 | font: { |
| 162 | family: FontAwesome; |
| 163 | style: normal; |
| 164 | weight: normal; |
| 165 | } |
| 166 | content: $fa-rewrite; |
| 167 | text-decoration: underline; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 168 | } |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 169 | > span { |
| 170 | display: none; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 175 | /** |
| 176 | * All operators |
| 177 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 178 | .operators { |
| 179 | opacity: 0; |
| 180 | white-space: nowrap; |
| 181 | padding: 0; |
| 182 | font-size: 0; |
| 183 | line-height: 0; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 184 | text-align: center; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | > .docGroup { |
| 188 | margin-left: 0; |
| 189 | } |
| 190 | |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 191 | .menu { |
| 192 | display: inline-block; |
| 193 | } |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 194 | |
Akron | 3ad4694 | 2018-08-22 16:47:14 +0200 | [diff] [blame] | 195 | .menu li[data-type=ref]:before, |
| 196 | span.key.ref:before { |
| 197 | content: $fa-referto; |
| 198 | font-family: 'FontAwesome'; |
Akron | d82e42a | 2018-08-22 17:08:59 +0200 | [diff] [blame] | 199 | padding-right: 4pt; |
Akron | 3ad4694 | 2018-08-22 16:47:14 +0200 | [diff] [blame] | 200 | style: normal; |
| 201 | weight: normal; |
Akron | 49f88cc | 2018-09-11 11:06:19 +0200 | [diff] [blame] | 202 | } |
Akron | 3ad4694 | 2018-08-22 16:47:14 +0200 | [diff] [blame] | 203 | |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 204 | div.value { |
| 205 | position: absolute; |
| 206 | display: inline-block; |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 207 | z-index: 8000; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 208 | padding: 4pt; |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 209 | margin-top: -6pt; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 210 | border: { |
| 211 | width: $border-size; |
| 212 | style: solid; |
| 213 | radius: $standard-border-radius; |
| 214 | } |
| 215 | input { |
| 216 | border-width: 0; |
| 217 | } |
| 218 | > div { |
| 219 | padding: 2pt; |
| 220 | cursor: pointer; |
| 221 | font: { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 222 | size: 80%; |
| 223 | style: italic; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 224 | } |
| 225 | display: inline-block; |
| 226 | @include choose-item; |
| 227 | border: { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 228 | width: $border-size; |
| 229 | style: solid; |
| 230 | radius: $standard-border-radius; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | &:hover { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 234 | @include choose-hover; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 235 | } |
| 236 | } |
| 237 | &.regex { |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 238 | > input { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 239 | font-style: italic; |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 240 | } |
| 241 | |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 242 | > div { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 243 | @include choose-active; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 244 | } |
| 245 | } |
| 246 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 247 | } |
| 248 | |
Akron | 49f88cc | 2018-09-11 11:06:19 +0200 | [diff] [blame] | 249 | .vc:not(.fragment) { |
| 250 | .docGroup, .doc { |
| 251 | // color: $nearly-white; |
| 252 | // color: $dark-green; |
| 253 | color: $dark-grey; |
| 254 | // text-shadow: $light-shadow; |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Rules for all docGroups |
| 259 | */ |
| 260 | // Whiten on hover |
| 261 | .docGroup:hover { |
| 262 | // background-color: rgba(255,255,255,.06); |
| 263 | background-color: rgba(255,255,255,.3); |
| 264 | } |
| 265 | |
| 266 | .doc > span.key.fixed { |
| 267 | color: $light-green; |
| 268 | } |
| 269 | |
| 270 | .doc > span:not(.fixed) { |
| 271 | cursor: pointer; |
| 272 | &:hover { |
| 273 | // color: $dark-green; |
| 274 | color: $dark-orange; |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | .rewritten .rewrite { |
| 279 | color: $dark-orange; |
| 280 | } |
| 281 | |
| 282 | .doc, .docGroup { |
| 283 | &:hover > .operators { |
| 284 | opacity: 1; |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | .docGroup { |
| 289 | &[data-operation] { |
| 290 | > .doc::before, |
| 291 | > .docGroup::before { |
| 292 | // color: $dark-green; |
| 293 | color: $dark-orange; |
| 294 | } |
| 295 | } |
| 296 | &[data-operation=or] { |
| 297 | border-color: $dark-orange; |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | div.value { |
| 302 | @include choose-item; |
| 303 | box-shadow: $choose-box-shadow; |
| 304 | } |
| 305 | } |
| 306 | |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 307 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 308 | /** |
| 309 | * The z-index cascade for groups. |
| 310 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 311 | $dg-index : 30; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 312 | .docGroup { |
| 313 | > .operators { |
| 314 | z-index: $dg-index; |
| 315 | } |
| 316 | .docGroup { |
| 317 | > .operators { |
| 318 | z-index: $dg-index + 1; |
| 319 | } |
| 320 | .docGroup { |
| 321 | > .operators { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 322 | z-index: $dg-index + 2; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 323 | } |
| 324 | .docGroup { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 325 | > .operators { |
| 326 | z-index: $dg-index + 3; |
| 327 | } |
| 328 | .docGroup { |
| 329 | > .operators { |
| 330 | z-index: $dg-index + 4; |
| 331 | } |
| 332 | .docGroup { |
| 333 | > .operators { |
| 334 | z-index: $dg-index + 5; |
| 335 | } |
| 336 | .docGroup { |
| 337 | > .operators { |
| 338 | z-index: $dg-index + 6; |
| 339 | } |
| 340 | } |
| 341 | } |
| 342 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 343 | } |
| 344 | } |
| 345 | } |
| 346 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 347 | |
Akron | 49f88cc | 2018-09-11 11:06:19 +0200 | [diff] [blame] | 348 | .vc.fragment { |
| 349 | .doc { |
| 350 | margin-right: 2em; |
| 351 | } |
| 352 | } |
| 353 | |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 354 | #collection { |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame] | 355 | line-height: 1em; |
| 356 | border-radius: $standard-border-radius; |
| 357 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 358 | |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 359 | /* |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 360 | header #vc-view > div { |
| 361 | margin: 1.3em 0 .5em 0; |
| 362 | } |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 363 | */ |
Akron | 5c829e9 | 2017-05-12 18:10:00 +0200 | [diff] [blame] | 364 | |
| 365 | #vc-choose > span.rewritten { |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 366 | &::after { |
Akron | 5c829e9 | 2017-05-12 18:10:00 +0200 | [diff] [blame] | 367 | color: $dark-orange; |
| 368 | padding: 0; |
| 369 | padding-left: 4px; |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 370 | font: { |
| 371 | family: FontAwesome; |
| 372 | style: normal; |
| 373 | weight: normal; |
| 374 | } |
| 375 | content: $fa-rewrite; |
| 376 | text-decoration: underline; |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 377 | } |
Akron | 6bb7158 | 2016-06-10 20:41:08 +0200 | [diff] [blame] | 378 | } |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 379 | |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 380 | div#vc-view { |
| 381 | position:relative; |
| 382 | > div.vc { |
| 383 | display: none; |
| 384 | &.active { |
| 385 | display: block; |
| 386 | } |
| 387 | margin: 1.3em 0 .5em 0; |
| 388 | border: 2px solid $dark-green; |
| 389 | background-color: $nearly-white; |
| 390 | > div:first-child { |
Akron | 2167ff5 | 2018-08-29 18:04:06 +0200 | [diff] [blame] | 391 | // margin: 1.3em; |
| 392 | padding: 1.3em; |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 393 | } |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 394 | } |
| 395 | } |
| 396 | |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 397 | div.panel.vcinfo { |
| 398 | padding: 3pt 0pt 3pt 3pt; |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 399 | background-color: $dark-green; |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 400 | div.button-group > span { |
| 401 | box-shadow: none; |
| 402 | } |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 403 | } |