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