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