| 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 | */ | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 11 | .vc { | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 12 | margin-top: 4pt; | 
|  | 13 |  | 
|  | 14 | /** | 
|  | 15 | * Rules for all docGroups | 
|  | 16 | */ | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 17 | .docGroup { | 
|  | 18 | position: relative; | 
|  | 19 | display: inline-block; | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 20 | margin-left: $left-padding; // 28pt | 
|  | 21 |  | 
|  | 22 | .docGroup { display: block; } | 
|  | 23 |  | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 24 | color: $nearly-white; | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 25 | padding: 4pt 2pt 4pt 0pt; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 26 | border: { | 
|  | 27 | radius: $standard-border-radius * 2; | 
|  | 28 | style: solid; | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 29 | width: 0 $bracket-size; // .6em .5em | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 30 | } | 
|  | 31 |  | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 32 | // Whiten on hover | 
|  | 33 | &:hover { | 
|  | 34 | background-color: rgba(255,255,255,.06); | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 35 | } | 
|  | 36 |  | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 37 | &[data-operation] { | 
|  | 38 | > .doc:first-child::before, | 
|  | 39 | > .docGroup:first-child::before { | 
|  | 40 | content: none; | 
|  | 41 | } | 
|  | 42 | > .doc::before, | 
|  | 43 | > .docGroup::before { | 
|  | 44 | display: inline-block; | 
|  | 45 | position: absolute; | 
|  | 46 | text-align: right; | 
|  | 47 | width: $left-padding; | 
|  | 48 | margin-left: -1 * ($left-padding + .5em); // -28pt | 
|  | 49 | color: $dark-green; | 
| Nils Diewald | 1fcb2ad | 2015-04-20 19:19:18 +0000 | [diff] [blame] | 50 | line-height: 1.5em; | 
|  | 51 | border-top: $border-size solid transparent; | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 52 | } | 
|  | 53 | > .docGroup::before { | 
|  | 54 | margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size); | 
|  | 55 | } | 
|  | 56 | } | 
|  | 57 |  | 
|  | 58 | // Or operation | 
|  | 59 | &[data-operation=or] { | 
|  | 60 | border-color: $dark-orange; | 
|  | 61 | > .doc::before, | 
|  | 62 | > .docGroup::before { | 
|  | 63 | // This will be overruled by JS! | 
|  | 64 | content: "or"; | 
|  | 65 | } | 
|  | 66 | } | 
|  | 67 |  | 
|  | 68 | // And operation | 
|  | 69 | &[data-operation=and] { | 
|  | 70 | > .doc::before, | 
|  | 71 | > .docGroup::before { | 
|  | 72 | // This will be overruled by JS! | 
|  | 73 | content: "and"; | 
|  | 74 | } | 
|  | 75 | } | 
|  | 76 |  | 
|  | 77 |  | 
|  | 78 | /** | 
|  | 79 | * All operators on groups | 
|  | 80 | */ | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 81 | > .operators { | 
|  | 82 | position: absolute; | 
|  | 83 | display: block; | 
|  | 84 | top: 10px; | 
|  | 85 | vertical-align: middle; | 
|  | 86 | left: 3px; | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 87 | > span:first-child { | 
|  | 88 | border: { | 
|  | 89 | top-left-radius: 0; | 
|  | 90 | bottom-left-radius: 0; | 
|  | 91 | } | 
|  | 92 | } | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 93 | margin-left: 100%; | 
|  | 94 | padding: 0; | 
|  | 95 | } | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 96 | } | 
|  | 97 |  | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 98 |  | 
|  | 99 | /** | 
|  | 100 | * All document rules | 
|  | 101 | */ | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 102 | .doc { | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 103 | padding-left: $left-padding; | 
| Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 104 | > span + span, | 
| Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 105 | > span + div + span { | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 106 | margin-left: 5pt; | 
|  | 107 | } | 
| Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 108 |  | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 109 | > span.key, | 
|  | 110 | > span.value { | 
|  | 111 | font-weight: bold; | 
| Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 112 | &[data-type=regex] { | 
|  | 113 | font-style: italic; | 
|  | 114 | &::after, &::before { | 
|  | 115 | content: '/'; | 
|  | 116 | } | 
|  | 117 | } | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 118 | } | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 119 |  | 
|  | 120 | /** | 
|  | 121 | * All operators on docs | 
|  | 122 | */ | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 123 | > .operators { | 
|  | 124 | display: inline-block; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 125 | margin-left: 10px; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 126 | } | 
|  | 127 | > span.key { | 
|  | 128 | position: relative; | 
|  | 129 | > ul { | 
|  | 130 | margin: 0; | 
|  | 131 | margin-left: 3.3em; | 
|  | 132 | } | 
|  | 133 | } | 
|  | 134 | } | 
|  | 135 |  | 
|  | 136 | .rewritten { | 
|  | 137 | .rewrite { | 
|  | 138 | margin-left: 4pt; | 
|  | 139 | display: inline-block; | 
|  | 140 | color: $dark-orange; | 
|  | 141 | &::after { | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 142 | font: { | 
|  | 143 | family: FontAwesome; | 
|  | 144 | style: normal; | 
|  | 145 | weight: normal; | 
|  | 146 | } | 
| Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame] | 147 | content: $fa-rewrite; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 148 | text-decoration: underline; | 
|  | 149 | } | 
|  | 150 | span { | 
|  | 151 | display: none; | 
|  | 152 | } | 
|  | 153 | } | 
|  | 154 | } | 
|  | 155 |  | 
| Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 156 | .doc > span { | 
| Nils Diewald | 1fcb2ad | 2015-04-20 19:19:18 +0000 | [diff] [blame] | 157 | cursor: pointer; | 
| Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 158 | &:hover { | 
|  | 159 | color: $dark-green; | 
|  | 160 | } | 
| Nils Diewald | 1fcb2ad | 2015-04-20 19:19:18 +0000 | [diff] [blame] | 161 | } | 
|  | 162 |  | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 163 | /** | 
|  | 164 | * All operators | 
|  | 165 | */ | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 166 | .operators { | 
|  | 167 | opacity: 0; | 
|  | 168 | white-space: nowrap; | 
|  | 169 | padding: 0; | 
|  | 170 | font-size: 0; | 
|  | 171 | line-height: 0; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 172 | text-align: center; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 173 |  | 
|  | 174 | > span { | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 175 | box-shadow: $choose-box-shadow; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 176 | cursor: pointer; | 
|  | 177 | font-size: 9pt; | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 178 | line-height: 1.5em; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 179 | padding: 0 4px; | 
|  | 180 | display: inline-block; | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 181 | @include choose-item; | 
|  | 182 | border-style: solid; | 
|  | 183 | border-width: $border-size 0; | 
|  | 184 | &:hover { | 
|  | 185 | @include choose-hover; | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 186 | } | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 187 | &:first-child { | 
|  | 188 | border: { | 
|  | 189 | left-width: $border-size; | 
|  | 190 | top-left-radius: $standard-border-radius; | 
|  | 191 | bottom-left-radius: $standard-border-radius; | 
|  | 192 | } | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 193 | } | 
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 194 | &:last-child { | 
|  | 195 | border: { | 
|  | 196 | right-width: $border-size; | 
|  | 197 | top-right-radius: $standard-border-radius; | 
|  | 198 | bottom-right-radius: $standard-border-radius; | 
|  | 199 | } | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 200 | } | 
|  | 201 | } | 
|  | 202 | } | 
|  | 203 |  | 
|  | 204 | > .docGroup { | 
|  | 205 | margin-left: 0; | 
|  | 206 | } | 
|  | 207 |  | 
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 208 | .doc, .docGroup { | 
|  | 209 | &:hover > .operators { | 
|  | 210 | opacity: 1; | 
|  | 211 | } | 
|  | 212 | } | 
|  | 213 |  | 
| Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 214 | .menu { | 
|  | 215 | display: inline-block; | 
|  | 216 | } | 
| Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 217 |  | 
|  | 218 | div.value { | 
|  | 219 | position: absolute; | 
|  | 220 | display: inline-block; | 
|  | 221 | @include choose-item; | 
|  | 222 | box-shadow: $choose-box-shadow; | 
|  | 223 | padding: 4pt; | 
|  | 224 | margin-top: -2pt; | 
|  | 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: { | 
|  | 237 | size: 80%; | 
|  | 238 | style: italic; | 
|  | 239 | } | 
|  | 240 | display: inline-block; | 
|  | 241 | @include choose-item; | 
|  | 242 | border: { | 
|  | 243 | width: $border-size; | 
|  | 244 | style: solid; | 
|  | 245 | radius: $standard-border-radius; | 
|  | 246 | } | 
|  | 247 |  | 
|  | 248 | &:hover { | 
|  | 249 | @include choose-hover; | 
|  | 250 | } | 
|  | 251 | } | 
|  | 252 | &.regex { | 
| Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 253 | > input { | 
|  | 254 | font-style: italic; | 
|  | 255 | } | 
|  | 256 |  | 
| Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 257 | > div { | 
|  | 258 | @include choose-active; | 
|  | 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 { | 
|  | 279 | z-index: $dg-index + 2; | 
|  | 280 | } | 
|  | 281 | .docGroup { | 
|  | 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 | } | 
|  | 300 | } | 
|  | 301 | } | 
|  | 302 | } | 
|  | 303 | } | 
| Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 304 |  | 
| Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame] | 305 | #vc { | 
|  | 306 | line-height: 1em; | 
|  | 307 | border-radius: $standard-border-radius; | 
|  | 308 | } | 
| Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 309 |  | 
|  | 310 | #vc-choose { | 
|  | 311 | &::after { | 
|  | 312 | content: $fa-down; | 
|  | 313 | padding: { | 
|  | 314 | left: 2pt; | 
|  | 315 | right: 4pt; | 
|  | 316 | } | 
|  | 317 | } | 
|  | 318 | &.active::after { | 
|  | 319 | content: $fa-up; | 
|  | 320 | } | 
|  | 321 | } |