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 | b19803c | 2018-08-16 16:39:42 +0200 | [diff] [blame] | 134 | > span.key.fixed { |
| 135 | color: $light-green; |
| 136 | } |
| 137 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 138 | /** |
| 139 | * All operators on docs |
| 140 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 141 | > .operators { |
| 142 | display: inline-block; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 143 | margin-left: 10px; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 144 | } |
| 145 | > span.key { |
| 146 | position: relative; |
| 147 | > ul { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 148 | margin: 0; |
| 149 | margin-left: 3.3em; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | .rewritten { |
| 155 | .rewrite { |
| 156 | margin-left: 4pt; |
| 157 | display: inline-block; |
| 158 | color: $dark-orange; |
| 159 | &::after { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 160 | font: { |
| 161 | family: FontAwesome; |
| 162 | style: normal; |
| 163 | weight: normal; |
| 164 | } |
| 165 | content: $fa-rewrite; |
| 166 | text-decoration: underline; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 167 | } |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 168 | > span { |
| 169 | display: none; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
Akron | b19803c | 2018-08-16 16:39:42 +0200 | [diff] [blame] | 174 | .doc > span:not(.fixed) { |
Nils Diewald | 1fcb2ad | 2015-04-20 19:19:18 +0000 | [diff] [blame] | 175 | cursor: pointer; |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 176 | &:hover { |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 177 | // color: $dark-green; |
| 178 | color: $dark-orange; |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 179 | } |
Nils Diewald | 1fcb2ad | 2015-04-20 19:19:18 +0000 | [diff] [blame] | 180 | } |
| 181 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 182 | /** |
| 183 | * All operators |
| 184 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 185 | .operators { |
| 186 | opacity: 0; |
| 187 | white-space: nowrap; |
| 188 | padding: 0; |
| 189 | font-size: 0; |
| 190 | line-height: 0; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 191 | text-align: center; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | > .docGroup { |
| 195 | margin-left: 0; |
| 196 | } |
| 197 | |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 198 | .doc, .docGroup { |
| 199 | &:hover > .operators { |
| 200 | opacity: 1; |
| 201 | } |
| 202 | } |
| 203 | |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 204 | .menu { |
| 205 | display: inline-block; |
| 206 | } |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 207 | |
Akron | 3ad4694 | 2018-08-22 16:47:14 +0200 | [diff] [blame] | 208 | .menu li[data-type=ref]:before, |
| 209 | span.key.ref:before { |
| 210 | content: $fa-referto; |
| 211 | font-family: 'FontAwesome'; |
Akron | d82e42a | 2018-08-22 17:08:59 +0200 | [diff] [blame] | 212 | padding-right: 4pt; |
Akron | 3ad4694 | 2018-08-22 16:47:14 +0200 | [diff] [blame] | 213 | style: normal; |
| 214 | weight: normal; |
| 215 | } |
| 216 | |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 217 | div.value { |
| 218 | position: absolute; |
| 219 | display: inline-block; |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 220 | z-index: 8000; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 221 | @include choose-item; |
| 222 | box-shadow: $choose-box-shadow; |
| 223 | padding: 4pt; |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 224 | margin-top: -6pt; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 225 | border: { |
| 226 | width: $border-size; |
| 227 | style: solid; |
| 228 | radius: $standard-border-radius; |
| 229 | } |
| 230 | input { |
| 231 | border-width: 0; |
| 232 | } |
| 233 | > div { |
| 234 | padding: 2pt; |
| 235 | cursor: pointer; |
| 236 | font: { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 237 | size: 80%; |
| 238 | style: italic; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 239 | } |
| 240 | display: inline-block; |
| 241 | @include choose-item; |
| 242 | border: { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 243 | width: $border-size; |
| 244 | style: solid; |
| 245 | radius: $standard-border-radius; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | &:hover { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 249 | @include choose-hover; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 250 | } |
| 251 | } |
| 252 | &.regex { |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 253 | > input { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 254 | font-style: italic; |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 255 | } |
| 256 | |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 257 | > div { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 258 | @include choose-active; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 259 | } |
| 260 | } |
| 261 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 265 | /** |
| 266 | * The z-index cascade for groups. |
| 267 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 268 | $dg-index : 30; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 269 | .docGroup { |
| 270 | > .operators { |
| 271 | z-index: $dg-index; |
| 272 | } |
| 273 | .docGroup { |
| 274 | > .operators { |
| 275 | z-index: $dg-index + 1; |
| 276 | } |
| 277 | .docGroup { |
| 278 | > .operators { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 279 | z-index: $dg-index + 2; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 280 | } |
| 281 | .docGroup { |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 282 | > .operators { |
| 283 | z-index: $dg-index + 3; |
| 284 | } |
| 285 | .docGroup { |
| 286 | > .operators { |
| 287 | z-index: $dg-index + 4; |
| 288 | } |
| 289 | .docGroup { |
| 290 | > .operators { |
| 291 | z-index: $dg-index + 5; |
| 292 | } |
| 293 | .docGroup { |
| 294 | > .operators { |
| 295 | z-index: $dg-index + 6; |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 300 | } |
| 301 | } |
| 302 | } |
| 303 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 304 | |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 305 | #collection { |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame] | 306 | line-height: 1em; |
| 307 | border-radius: $standard-border-radius; |
| 308 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 309 | |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 310 | /* |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 311 | header #vc-view > div { |
| 312 | margin: 1.3em 0 .5em 0; |
| 313 | } |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 314 | */ |
Akron | 5c829e9 | 2017-05-12 18:10:00 +0200 | [diff] [blame] | 315 | |
| 316 | #vc-choose > span.rewritten { |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 317 | &::after { |
Akron | 5c829e9 | 2017-05-12 18:10:00 +0200 | [diff] [blame] | 318 | color: $dark-orange; |
| 319 | padding: 0; |
| 320 | padding-left: 4px; |
Akron | 76c3dd6 | 2018-05-29 20:58:27 +0200 | [diff] [blame] | 321 | font: { |
| 322 | family: FontAwesome; |
| 323 | style: normal; |
| 324 | weight: normal; |
| 325 | } |
| 326 | content: $fa-rewrite; |
| 327 | text-decoration: underline; |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 328 | } |
Akron | 6bb7158 | 2016-06-10 20:41:08 +0200 | [diff] [blame] | 329 | } |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 330 | |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 331 | div#vc-view { |
| 332 | position:relative; |
| 333 | > div.vc { |
| 334 | display: none; |
| 335 | &.active { |
| 336 | display: block; |
| 337 | } |
| 338 | margin: 1.3em 0 .5em 0; |
| 339 | border: 2px solid $dark-green; |
| 340 | background-color: $nearly-white; |
| 341 | > div:first-child { |
| 342 | margin: 1.3em; |
| 343 | } |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 344 | } |
| 345 | } |
| 346 | |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 347 | div.panel.vcinfo { |
| 348 | padding: 3pt 0pt 3pt 3pt; |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 349 | background-color: $dark-green; |
Akron | ec6bb8e | 2018-08-29 13:07:56 +0200 | [diff] [blame] | 350 | div.button-group > span { |
| 351 | box-shadow: none; |
| 352 | } |
hebasta | e2ff070 | 2018-06-29 14:26:00 +0200 | [diff] [blame] | 353 | } |