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