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