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, |
| 105 | > span + .menu + span{ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 106 | margin-left: 5pt; |
| 107 | } |
| 108 | > span.key, |
| 109 | > span.value { |
| 110 | font-weight: bold; |
| 111 | } |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 112 | |
| 113 | /** |
| 114 | * All operators on docs |
| 115 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 116 | > .operators { |
| 117 | display: inline-block; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 118 | margin-left: 10px; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 119 | } |
| 120 | > span.key { |
| 121 | position: relative; |
| 122 | > ul { |
| 123 | margin: 0; |
| 124 | margin-left: 3.3em; |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | .rewritten { |
| 130 | .rewrite { |
| 131 | margin-left: 4pt; |
| 132 | display: inline-block; |
| 133 | color: $dark-orange; |
| 134 | &::after { |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 135 | font: { |
| 136 | family: FontAwesome; |
| 137 | style: normal; |
| 138 | weight: normal; |
| 139 | } |
Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame] | 140 | content: $fa-rewrite; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 141 | text-decoration: underline; |
| 142 | } |
| 143 | span { |
| 144 | display: none; |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 149 | .doc > span { |
Nils Diewald | 1fcb2ad | 2015-04-20 19:19:18 +0000 | [diff] [blame] | 150 | cursor: pointer; |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 151 | &:hover { |
| 152 | color: $dark-green; |
| 153 | } |
Nils Diewald | 1fcb2ad | 2015-04-20 19:19:18 +0000 | [diff] [blame] | 154 | } |
| 155 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 156 | /** |
| 157 | * All operators |
| 158 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 159 | .operators { |
| 160 | opacity: 0; |
| 161 | white-space: nowrap; |
| 162 | padding: 0; |
| 163 | font-size: 0; |
| 164 | line-height: 0; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 165 | text-align: center; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 166 | |
| 167 | > span { |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 168 | box-shadow: $choose-box-shadow; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 169 | cursor: pointer; |
| 170 | font-size: 9pt; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 171 | line-height: 1.5em; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 172 | padding: 0 4px; |
| 173 | display: inline-block; |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 174 | @include choose-item; |
| 175 | border-style: solid; |
| 176 | border-width: $border-size 0; |
| 177 | &:hover { |
| 178 | @include choose-hover; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 179 | } |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 180 | &:first-child { |
| 181 | border: { |
| 182 | left-width: $border-size; |
| 183 | top-left-radius: $standard-border-radius; |
| 184 | bottom-left-radius: $standard-border-radius; |
| 185 | } |
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 | &:last-child { |
| 188 | border: { |
| 189 | right-width: $border-size; |
| 190 | top-right-radius: $standard-border-radius; |
| 191 | bottom-right-radius: $standard-border-radius; |
| 192 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 193 | } |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | > .docGroup { |
| 198 | margin-left: 0; |
| 199 | } |
| 200 | |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 201 | .doc, .docGroup { |
| 202 | &:hover > .operators { |
| 203 | opacity: 1; |
| 204 | } |
| 205 | } |
| 206 | |
Nils Diewald | 4c22125 | 2015-04-21 20:19:25 +0000 | [diff] [blame] | 207 | .menu { |
| 208 | display: inline-block; |
| 209 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | |
Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame] | 213 | /** |
| 214 | * The z-index cascade for groups. |
| 215 | */ |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 216 | $dg-index : 30; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 217 | .docGroup { |
| 218 | > .operators { |
| 219 | z-index: $dg-index; |
| 220 | } |
| 221 | .docGroup { |
| 222 | > .operators { |
| 223 | z-index: $dg-index + 1; |
| 224 | } |
| 225 | .docGroup { |
| 226 | > .operators { |
| 227 | z-index: $dg-index + 2; |
| 228 | } |
| 229 | .docGroup { |
| 230 | > .operators { |
| 231 | z-index: $dg-index + 3; |
| 232 | } |
| 233 | .docGroup { |
| 234 | > .operators { |
| 235 | z-index: $dg-index + 4; |
| 236 | } |
| 237 | .docGroup { |
| 238 | > .operators { |
| 239 | z-index: $dg-index + 5; |
| 240 | } |
| 241 | .docGroup { |
| 242 | > .operators { |
| 243 | z-index: $dg-index + 6; |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | } |
| 251 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 252 | |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame^] | 253 | #vc { |
| 254 | line-height: 1em; |
| 255 | border-radius: $standard-border-radius; |
| 256 | } |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 257 | |
| 258 | #vc-choose { |
| 259 | &::after { |
| 260 | content: $fa-down; |
| 261 | padding: { |
| 262 | left: 2pt; |
| 263 | right: 4pt; |
| 264 | } |
| 265 | } |
| 266 | &.active::after { |
| 267 | content: $fa-up; |
| 268 | } |
| 269 | } |