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