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