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