| 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; | ||||
| 50 | } | ||||
| 51 | > .docGroup::before { | ||||
| 52 | margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size); | ||||
| 53 | } | ||||
| 54 | } | ||||
| 55 | |||||
| 56 | // Or operation | ||||
| 57 | &[data-operation=or] { | ||||
| 58 | border-color: $dark-orange; | ||||
| 59 | > .doc::before, | ||||
| 60 | > .docGroup::before { | ||||
| 61 | // This will be overruled by JS! | ||||
| 62 | content: "or"; | ||||
| 63 | } | ||||
| 64 | } | ||||
| 65 | |||||
| 66 | // And operation | ||||
| 67 | &[data-operation=and] { | ||||
| 68 | > .doc::before, | ||||
| 69 | > .docGroup::before { | ||||
| 70 | // This will be overruled by JS! | ||||
| 71 | content: "and"; | ||||
| 72 | } | ||||
| 73 | } | ||||
| 74 | |||||
| 75 | |||||
| 76 | /** | ||||
| 77 | * All operators on groups | ||||
| 78 | */ | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 79 | > .operators { |
| 80 | position: absolute; | ||||
| 81 | display: block; | ||||
| 82 | top: 10px; | ||||
| 83 | vertical-align: middle; | ||||
| 84 | left: 3px; | ||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 85 | > span:first-child { |
| 86 | border: { | ||||
| 87 | top-left-radius: 0; | ||||
| 88 | bottom-left-radius: 0; | ||||
| 89 | } | ||||
| 90 | } | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 91 | margin-left: 100%; |
| 92 | padding: 0; | ||||
| 93 | } | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 94 | } |
| 95 | |||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 96 | |
| 97 | /** | ||||
| 98 | * All document rules | ||||
| 99 | */ | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 100 | .doc { |
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 101 | padding-left: $left-padding; |
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 102 | > span + span { |
| 103 | margin-left: 5pt; | ||||
| 104 | } | ||||
| 105 | > span.key, | ||||
| 106 | > span.value { | ||||
| 107 | font-weight: bold; | ||||
| 108 | } | ||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 109 | |
| 110 | /** | ||||
| 111 | * All operators on docs | ||||
| 112 | */ | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 113 | > .operators { |
| 114 | display: inline-block; | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 115 | margin-left: 10px; |
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 116 | } |
| 117 | > span.key { | ||||
| 118 | position: relative; | ||||
| 119 | > ul { | ||||
| 120 | margin: 0; | ||||
| 121 | margin-left: 3.3em; | ||||
| 122 | } | ||||
| 123 | } | ||||
| 124 | } | ||||
| 125 | |||||
| 126 | .rewritten { | ||||
| 127 | .rewrite { | ||||
| 128 | margin-left: 4pt; | ||||
| 129 | display: inline-block; | ||||
| 130 | color: $dark-orange; | ||||
| 131 | &::after { | ||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 132 | font: { |
| 133 | family: FontAwesome; | ||||
| 134 | style: normal; | ||||
| 135 | weight: normal; | ||||
| 136 | } | ||||
| Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame] | 137 | content: $fa-rewrite; |
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 138 | text-decoration: underline; |
| 139 | } | ||||
| 140 | span { | ||||
| 141 | display: none; | ||||
| 142 | } | ||||
| 143 | } | ||||
| 144 | } | ||||
| 145 | |||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 146 | /** |
| 147 | * All operators | ||||
| 148 | */ | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 149 | .operators { |
| 150 | opacity: 0; | ||||
| 151 | white-space: nowrap; | ||||
| 152 | padding: 0; | ||||
| 153 | font-size: 0; | ||||
| 154 | line-height: 0; | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 155 | text-align: center; |
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 156 | |
| 157 | > span { | ||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 158 | box-shadow: $choose-box-shadow; |
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 159 | cursor: pointer; |
| 160 | font-size: 9pt; | ||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 161 | line-height: 1.5em; |
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 162 | padding: 0 4px; |
| 163 | display: inline-block; | ||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 164 | @include choose-item; |
| 165 | border-style: solid; | ||||
| 166 | border-width: $border-size 0; | ||||
| 167 | &:hover { | ||||
| 168 | @include choose-hover; | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 169 | } |
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 170 | &:first-child { |
| 171 | border: { | ||||
| 172 | left-width: $border-size; | ||||
| 173 | top-left-radius: $standard-border-radius; | ||||
| 174 | bottom-left-radius: $standard-border-radius; | ||||
| 175 | } | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 176 | } |
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 177 | &:last-child { |
| 178 | border: { | ||||
| 179 | right-width: $border-size; | ||||
| 180 | top-right-radius: $standard-border-radius; | ||||
| 181 | bottom-right-radius: $standard-border-radius; | ||||
| 182 | } | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 183 | } |
| 184 | } | ||||
| 185 | } | ||||
| 186 | |||||
| 187 | > .docGroup { | ||||
| 188 | margin-left: 0; | ||||
| 189 | } | ||||
| 190 | |||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 191 | .doc, .docGroup { |
| 192 | &:hover > .operators { | ||||
| 193 | opacity: 1; | ||||
| 194 | } | ||||
| 195 | } | ||||
| 196 | |||||
| 197 | } | ||||
| 198 | |||||
| 199 | |||||
| Nils Diewald | 359a72c | 2015-04-20 17:40:29 +0000 | [diff] [blame^] | 200 | /** |
| 201 | * The z-index cascade for groups. | ||||
| 202 | */ | ||||
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 203 | $dg-index : 30; |
| Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 204 | .docGroup { |
| 205 | > .operators { | ||||
| 206 | z-index: $dg-index; | ||||
| 207 | } | ||||
| 208 | .docGroup { | ||||
| 209 | > .operators { | ||||
| 210 | z-index: $dg-index + 1; | ||||
| 211 | } | ||||
| 212 | .docGroup { | ||||
| 213 | > .operators { | ||||
| 214 | z-index: $dg-index + 2; | ||||
| 215 | } | ||||
| 216 | .docGroup { | ||||
| 217 | > .operators { | ||||
| 218 | z-index: $dg-index + 3; | ||||
| 219 | } | ||||
| 220 | .docGroup { | ||||
| 221 | > .operators { | ||||
| 222 | z-index: $dg-index + 4; | ||||
| 223 | } | ||||
| 224 | .docGroup { | ||||
| 225 | > .operators { | ||||
| 226 | z-index: $dg-index + 5; | ||||
| 227 | } | ||||
| 228 | .docGroup { | ||||
| 229 | > .operators { | ||||
| 230 | z-index: $dg-index + 6; | ||||
| 231 | } | ||||
| 232 | } | ||||
| 233 | } | ||||
| 234 | } | ||||
| 235 | } | ||||
| 236 | } | ||||
| 237 | } | ||||
| 238 | } | ||||