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; |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 221 | z-index: 8000; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 222 | @include choose-item; |
| 223 | box-shadow: $choose-box-shadow; |
| 224 | padding: 4pt; |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 225 | margin-top: -6pt; |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 226 | border: { |
| 227 | width: $border-size; |
| 228 | style: solid; |
| 229 | radius: $standard-border-radius; |
| 230 | } |
| 231 | input { |
| 232 | border-width: 0; |
| 233 | } |
| 234 | > div { |
| 235 | padding: 2pt; |
| 236 | cursor: pointer; |
| 237 | font: { |
| 238 | size: 80%; |
| 239 | style: italic; |
| 240 | } |
| 241 | display: inline-block; |
| 242 | @include choose-item; |
| 243 | border: { |
| 244 | width: $border-size; |
| 245 | style: solid; |
| 246 | radius: $standard-border-radius; |
| 247 | } |
| 248 | |
| 249 | &:hover { |
| 250 | @include choose-hover; |
| 251 | } |
| 252 | } |
| 253 | &.regex { |
Nils Diewald | 9c12506 | 2015-05-05 23:54:17 +0000 | [diff] [blame] | 254 | > input { |
| 255 | font-style: italic; |
| 256 | } |
| 257 | |
Nils Diewald | c4c4b83 | 2015-05-05 16:00:08 +0000 | [diff] [blame] | 258 | > div { |
| 259 | @include choose-active; |
| 260 | } |
| 261 | } |
| 262 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 263 | } |
| 264 | |
| 265 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 266 | /** |
| 267 | * The z-index cascade for groups. |
| 268 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 269 | $dg-index : 30; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 270 | .docGroup { |
| 271 | > .operators { |
| 272 | z-index: $dg-index; |
| 273 | } |
| 274 | .docGroup { |
| 275 | > .operators { |
| 276 | z-index: $dg-index + 1; |
| 277 | } |
| 278 | .docGroup { |
| 279 | > .operators { |
| 280 | z-index: $dg-index + 2; |
| 281 | } |
| 282 | .docGroup { |
| 283 | > .operators { |
| 284 | z-index: $dg-index + 3; |
| 285 | } |
| 286 | .docGroup { |
| 287 | > .operators { |
| 288 | z-index: $dg-index + 4; |
| 289 | } |
| 290 | .docGroup { |
| 291 | > .operators { |
| 292 | z-index: $dg-index + 5; |
| 293 | } |
| 294 | .docGroup { |
| 295 | > .operators { |
| 296 | z-index: $dg-index + 6; |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 305 | |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 306 | #collection { |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame] | 307 | line-height: 1em; |
| 308 | border-radius: $standard-border-radius; |
| 309 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 310 | |
| 311 | #vc-choose { |
| 312 | &::after { |
| 313 | content: $fa-down; |
| 314 | padding: { |
| 315 | left: 2pt; |
| 316 | right: 4pt; |
| 317 | } |
| 318 | } |
| 319 | &.active::after { |
| 320 | content: $fa-up; |
| 321 | } |
| 322 | } |